Getting current date/time Mac OS total seconds

Ivan Smahin ivan_smahin at paradigmasoft.com
Fri Dec 21 08:40:40 CST 2007


Hello jda,

Friday, December 21, 2007, 4:24:04 PM, you wrote:


> What I need is something like this:

> SQLDateTime = Current() //date and time NOW

> SQLtotalSeconds = convertToSQLSeconds(SQLDateTime) //convert to seconds

> MacOSTotalSeconds = convertToMacOSTotalSeconds(SQLTotalSeconds) //Mac 
> OS dates start in 1904, I believe

> if MacOSTotalSeconds - oneWeekInSeconds <=
> storedTotalSecondsWhenCreated then
>      //this record was created within the last week
> end if

-- How much seconds passed since 01.01.1900
SELECT datediff( '1900-01-01 00:00:00', now(), 'second' )



-- 
Best regards,
Ivan Smahin 
Senior Software Engineer
Paradigma Software, Inc
Valentina - The Ultra-Fast Database
http://www.valentina-db.com



More information about the Valentina mailing list