Tony,
How about use millisecond in the datepart
dateDiff(ms,'01/01/1970 00:00:00.000',DATEADD(Day, 22, '01/01/1970'))

however, for milliseconds, the maximum number datediff can produce is 24
days, 20 hours, 31 minutes

Hua

-----Original Message-----
From: Tony Weeg [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 05, 2004 2:08 PM
To: CF-Talk
Subject: sql question (Quick and easy)

hi there...

this query below returns an epoch time, something like 1083851729

select dateDiff(ss,'01/01/1970 00:00:00.000',DATEADD(Day, -91,
GetDate()))

which is GREAT, and translates into: 05/06/2004 14:55:29

but....

i need to get: 05/06/2004 00:00:00.000

i can do it all day long in cfml, but i need to do it in sql code.

any ideas?

thanks.

here is my first attempt...but obviously...it gave me an error:

select
dateDiff(ss,'01/01/1970 00:00:00.000',DATEADD(Day, -91, day(getDate())))

any help, as always is MUCH Appreciated.

--
tony

Tony Weeg
human.
email: tonyweeg [at] gmail [dot] com
blog: http://www.revolutionwebdesign.com/blog/

Check out http://www.antiwrap.com to send websites to your friends.
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to