Sign in to follow this  
Followers 0
GregThompson

Is there a way to do a SQL Convert?

5 posts in this topic

I want to basically do this:

select convert(datetime, dateadd(s, 1228147305, '1/1/1970'))) = '2008-12-01 06:00:04.000')

But in AutoIT? Is this possible?

Share this post


Link to post
Share on other sites



There is a func called _DateAdd :)

#include <Date.au3>
$date = _DateAdd("s",1228147305,"1970/1/1 00:00:00")
MsgBox(0, '', $date)

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Share this post


Link to post
Share on other sites

There is a func called _DateAdd :)

#include <Date.au3>
$date = _DateAdd("s",1228147305,"1970/1/1 00:00:00")
MsgBox(0, '', $date)
thanks a bunch!

Share this post


Link to post
Share on other sites

Let me rephrase the question... I want to take a DATE/TIME, and convert it to the long number, not the other way around.

Share this post


Link to post
Share on other sites

Anything?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0