Jump to content

Archived

This topic is now archived and is closed to further replies.

ShivaGupta

need help with time.

Recommended Posts

i use this to get current hour info.

$now = Date("h");

but here is a prov .i get result as am pm eg 08 pm.but i want as 24hours eg   20.

 

 

can u help me out plz.

Share this post


Link to post
Share on other sites

Just swap it to a capital H and you get the 24 hour time =)

 

 

Edit: or 'G' if you want to get rid of the leading zeros.

Share this post


Link to post
Share on other sites

Shiva,

 

Not to be rude, but did you even look at the manual for the date() function? It gives a whole table of the different 'format' characters and an explanation of what the return value will be for each.

Share this post


Link to post
Share on other sites

Just swap it to a capital H and you get the 24 hour time =)

 

 

Edit: or 'G' if you want to get rid of the leading zero

Thank You Sir.

Share this post


Link to post
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.