|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Article Dicussion: Working with dates and times in PHP
If you have any questions or comments on this article then please post them here.
This forum post relates to this article |
|
#2
|
|||
|
|||
|
whats the best method of storing a date in a db?
Hi all,
i enjoyed reading this article... however i think it could be improved upon. as my post subject suggests i would like to know the best method of storing the date & time into a database.... eg i was thinking of using it to track the last time a visiter came to my site, then display that back to the user in human friendly terms... does this make sense... i know how to store stuff into a database and then pull it out... i just need to know what function i should use or what format i should use to store the date & time into the database. thanks for the info so far though.. Regards Chunks |
|
#3
|
|||
|
|||
|
To store date & time in MySQL I prefer using DATETIME field type. Coz I can easily format it using built in MySQL command (DATE_FORMAT), and also there are much more built in command in MySQL dealing with this field type.
|
|
#4
|
|||
|
|||
|
hi,
that option sounds like a good one, could you be perhaps a little more specific in the details or where i could find out more info on working with times & dates in php (MySQL as well) Regards Chunks |
![]() |
| Viewing: Dev Articles Community Forums > Programming > Programming Tools > Article Dicussion: Working with dates and times in PHP |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|