Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

Time and date

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

Time and date

Postby Xerpher » Mon Oct 07, 2002 4:43 pm

I couldn't figure this out from php.net so I came to the next best place :D

I've got the date function working the way I want it to date("m/d/y"), but I want to get the time in that same basic format ( like 8:43:28 { HH:MM:SS } )

Anyone know what I have to do?
Xerpher
New php-forum User
New php-forum User
 
Posts: 164
Joined: Tue Aug 27, 2002 8:25 pm
Location: Ontario, Canada

Postby DoppyNL » Mon Oct 07, 2002 10:44 pm

just use the date function, it can also handle times! it is described in the manual: http://www.php.net/date

you could also use strftime optionally in combination with setlocale, that way you can create dates in a lot of languages :)

Greetz Daan
DoppyNL
 

Postby Xerpher » Tue Oct 08, 2002 7:30 am

:oops: I didn't notice all those extra commands I could put in the date string. Thanks :D
Xerpher
New php-forum User
New php-forum User
 
Posts: 164
Joined: Tue Aug 27, 2002 8:25 pm
Location: Ontario, Canada


Return to PHP coding => General

Who is online

Users browsing this forum: Baidu [Spider] and 2 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.