Posted:
Fri Aug 25, 2006 3:11 pm (18 years, 4 months ago)
Hi,
I am not well versed in SQL or PHP but desperately need help. I have "inherited" a database that I just need to retrieve the data to save for future use if needed. However the dates are in Unixtime and I cannot read them. I saw the Unixtime converter but I have over 300 dates that I need to convert. Can anyone tell me if there is an SQL query that I can run to get the dates to convert? Or if there is a formula I can put in Excel to convert the dates? Any help would be greatly appreciated. Thank you.
John
plusplus Junior WebHelper
Joined: 01 Dec 2010
Posts: 5
Posted:
Mon Dec 06, 2010 7:36 pm (14 years ago)
Hi John,
for Excel
=(CELL-"1/1/1970")*60*60*24
where CELL is the cell containing a regular date
good luck!
dave476 Junior WebHelper
Joined: 18 Aug 2012
Posts: 2
Location: UK
Posted:
Sat Aug 18, 2012 1:47 pm (12 years, 4 months ago)
Depends on which flavour of SQL you are talking about.
But in MySQL you can use:
FROM_UNIXTIME()
converts from an Unix timestamp stored in a DB to human-readable date format.
You cannot post new topics in this forum. You cannot reply to topics in this forum. You cannot edit your posts in this forum. You cannot delete your posts in this forum. You cannot vote in polls in this forum.