Link to home
Start Free TrialLog in
Avatar of fwstealer
fwstealerFlag for United States of America

asked on

get dates

what's the best way to meet the following?

end date is now - 6hrs
start date is end date - 48hrs

Does this seem right?

declare @startDate as datetime
declare @endDate as datetime

Set @endDate = dateadd(hh,-6,getdate())
Set @startDate =  dateadd(hh,-48,@endDate)
ASKER CERTIFIED SOLUTION
Avatar of mastoo
mastoo
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of fwstealer

ASKER

i wish - no I just sux at sql :-)