November 24, 2004 at 11:47 am
tranxdate:
2004-11-20 00:55:41.000
How to get the previous date(2004-11-19)?
tranxdate - 1?
November 24, 2004 at 12:07 pm
Try this:
select dateadd(day,-1, tranxdate)
See DATEADD in BOL for details.
Greg
Greg
November 24, 2004 at 12:28 pm
Thanks Greg!
Can you include your user defined function in DATE FUNCTION?
select dateadd(day,-1, MaxLoginTime('2004-11-20 00:55:41.000'))
got error msg:
Server: Msg 195, Level 15, State 10, Line 1
'MaxLoginTime' is not a recognized function name.
November 24, 2004 at 1:18 pm
You need to qualify your function name... DBName.ownername.MaxLoginTime()
Steve
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply