3 Replies - 4064 Views - Last Post: 15 January 2012 - 02:13 AM Rate Topic: -----

#1 jeffpoy0816  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 11
  • Joined: 09-December 11

what is the code of military time in php ?

Posted 14 January 2012 - 11:09 PM

hi sir/ mam

please help me im a new php developer


what is the code of military time in php?

the format is 00:00:00


thanks
Is This A Good Question/Topic? 0
  • +

Replies To: what is the code of military time in php ?

#2 GunnerInc  Icon User is online

  • "Hurry up and wait"
  • member icon




Reputation: 858
  • View blog
  • Posts: 2,298
  • Joined: 28-March 11

Re: what is the code of military time in php ?

Posted 14 January 2012 - 11:27 PM

There are 24 hours in a day right? So 0100 0200 1100 1200 1300 2300 0000 etc..
Was This Post Helpful? 1
  • +
  • -

#3 no2pencil  Icon User is online

  • Admiral Fancy Pants
  • member icon

Reputation: 5379
  • View blog
  • Posts: 27,350
  • Joined: 10-May 07

Re: what is the code of military time in php ?

Posted 14 January 2012 - 11:31 PM

With which functions are you trying to use it? All documentation on PHP.net is accurate & helpful & will show you the syntax for the command.
Was This Post Helpful? 0
  • +
  • -

#4 creativecoding  Icon User is offline

  • Hash != Encryption
  • member icon


Reputation: 927
  • View blog
  • Posts: 3,210
  • Joined: 19-January 10

Re: what is the code of military time in php ?

Posted 15 January 2012 - 02:13 AM

You can use the date function to complete what you want to achieve.

echo date("Hi"); // H = Hours in 24-hour format w/ leading zeros; i = Minutes w/ leading zeros



As of 1:13 Am, that will output "0113"
Was This Post Helpful? 2
  • +
  • -

Page 1 of 1