Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Parameter setting for DateTime Expand / Collapse
Author
Message
Posted Saturday, September 21, 2013 2:46 PM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Wednesday, March 19, 2014 8:47 PM
Points: 55, Visits: 132
I have a StartDateTime parameter for my report and I'd like to always set to 2pm yesterday time.

The expression I had for default value fails on me and I'd appreciate if anyone can help me to correct it:
=DateAdd("d",-1,today) + " 2:00PM"

Thanks in advance!
Post #1497162
Posted Saturday, September 21, 2013 11:12 PM
Right there with Babe

Right there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with Babe

Group: General Forum Members
Last Login: Today @ 6:45 AM
Points: 773, Visits: 4,972
You're missing the "Add 14 hours" part...

=DateAdd("h",14,DateAdd("d",-1,Today))

Post #1497184
Posted Sunday, September 22, 2013 1:01 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Wednesday, March 19, 2014 8:47 PM
Points: 55, Visits: 132
Thanks!
Post #1497189
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse