Connecting Tech Pros Worldwide Help | Site Map

OLE Automation Date conversion

  #1  
Old May 25th, 2007, 02:35 PM
Israel
Guest
 
Posts: n/a
I have a database with many datetime columns that are stored as
floating point numbers that represent the number of days since Jan 01,
1900 - or I guess it's really since Jan 00, 1900. This was done
because the datetime field in MySQL had a precision of only 1 second
and we needed fractional seconds - I'm not sure if this constraint is
still true.

Currently we don't have time to write any frontend applications to
query the database so I want to make it easier for people to filter
the data without having to convert to/from a number.

What I'm looking for is some type of MySQL conversion function to do
the following:

SELECT * FROM mytable WHERE timestamp ConvertToNumber("2007/5/25
1:23 PM")

SELECT ConvertToDateTime(timestamp), someothercolumn, FROM mytable

The only related methods I could find where CAST() and CONVERT() but I
couldn't find any way to use them to produce the results I wanted.

Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
Commit Transaction Even on Trigger Failure bwestover answers 1 November 13th, 2007 06:43 AM
Tough Date conversion problem.. importing from excel jereviscious answers 2 August 31st, 2006 03:15 PM
VB.Net Date Serial? sam answers 4 November 21st, 2005 05:37 PM