View Full Version : Converting mysql time stamp into php
gurmeet
03-08-2009, 11:58 AM
Hi friends... I have a table, in which i had stored the date with timestamp... Now i want to retrieve that value into php..plz give me the snippet of code how i can convert this value into proper readable date...
JasonDFR
03-08-2009, 12:34 PM
http://www.dynamicdrive.com/forums/showthread.php?t=42374
If this doesn't answer your question, you are going to have to give more information.
The format of your timestamp in MYSQL would be a good place to start.
I am assuming it is the standarad MySQL datetime, but who knows.
gurmeet
03-09-2009, 03:36 PM
ok... then give me sughgestions how i can store date and time in MySQL databse that is easy to retrieve in PHP n i can use it for calculating dates for web page.... means in which format i should save the date value in table..?
JasonDFR
03-09-2009, 03:44 PM
This is the format: 2009-03-09 16:43:19
The field TYPE is DATETIME .
gurmeet
10-31-2009, 07:21 AM
actually i want to calculate time n dates
suppose sm1 feeds data on 31-10-2009 at 11:00am so "today" with time must b printed on page...and so on..
means on 30-11-09 it must b printed as "on month before" on screen
james438
11-06-2009, 02:16 AM
actually i want to calculate time n dates
suppose sm1 feeds data on 31-10-2009 at 11:00am so "today" with time must b printed on page...and so on..
means on 30-11-09 it must b printed as "on month before" on screen
Could you rephrase that using better grammar? I just can't understand what you're trying to say.
I can say that datetime does store both the date and the time into your table.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.