Notices
Computer & Technology Related Post here for help and discussion of computing and related technology. Internet, TVs, phones, consoles, computers, tablets and any other gadgets.

Date conversion

Thread Tools
 
Search this Thread
 
Old 09 February 2005, 10:56 AM
  #1  
Figment
Scooby Regular
Thread Starter
 
Figment's Avatar
 
Join Date: Jul 2001
Location: deep inside your imagination
Posts: 24,057
Likes: 0
Received 0 Likes on 0 Posts
Default Date conversion

How do I convert dates (random example: 1105048464) in a MySQL database to DD-MM-YYYY / YYYY-MM-DD etc format?

More to the point, what SQL do I need to query all records with an ent_date earlier than a specified date?

Thanks
Old 09 February 2005, 12:03 PM
  #2  
stevencotton
Scooby Regular
 
stevencotton's Avatar
 
Join Date: Jan 2001
Location: behind twin turbos
Posts: 2,710
Likes: 0
Received 1 Like on 1 Post
Default

The number you have there is the number of seconds since the epoch (which differs across architecture). Check out the UNIXTIME function docs in the MySQL documentation, which will allow you to convert between epoch seconds and MySQL format.
Old 09 February 2005, 03:22 PM
  #3  
Figment
Scooby Regular
Thread Starter
 
Figment's Avatar
 
Join Date: Jul 2001
Location: deep inside your imagination
Posts: 24,057
Likes: 0
Received 0 Likes on 0 Posts
Default

Cheers Steve. Sorted now
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
Ganz1983
Subaru
5
02 October 2015 09:22 AM
thunder8
General Technical
0
01 October 2015 09:13 PM
makkink
General Technical
10
01 October 2015 05:41 PM
yabbadoo4
ScoobyNet General
11
30 September 2015 10:33 PM
shorty87
Other Marques
0
25 September 2015 08:52 PM



Quick Reply: Date conversion



All times are GMT +1. The time now is 11:42 AM.