Programming Tools
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingProgramming Tools

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old March 7th, 2003, 07:00 PM
benos benos is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Posts: 233 benos User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
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

Reply With Quote
  #2  
Old March 8th, 2003, 01:48 AM
Chunks Chunks is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Location: Australia
Posts: 6 Chunks User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
  #3  
Old March 9th, 2003, 07:56 AM
hermawan hermawan is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Location: DKI Jakarta
Posts: 2 hermawan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to hermawan
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.

Reply With Quote
  #4  
Old March 10th, 2003, 01:47 AM
Chunks Chunks is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Location: Australia
Posts: 6 Chunks User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingProgramming Tools > Article Dicussion: Working with dates and times in PHP


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT