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

Add days to date SSRS Expression Expand / Collapse
Author
Message
Posted Tuesday, October 16, 2012 4:14 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, December 24, 2013 4:56 AM
Points: 178, Visits: 668

Hi geniuses,

How do I add days to a date in an expression.
Field: payment_date
and I want to add 15 days to that date

Thanks!
Regards
Post #1373109
Posted Tuesday, October 16, 2012 6:13 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Friday, July 25, 2014 6:57 AM
Points: 1,163, Visits: 1,188
In the Expression editor, under the Common Functions in the Category window look at the Date & Time functions. Use the DateAdd() function.

=DateAdd("d", 15, Fields!payment_date)

HTH,
Rob
Post #1373188
Posted Tuesday, October 16, 2012 7:02 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, December 24, 2013 4:56 AM
Points: 178, Visits: 668

Thanks!
And If I want to add 15 days to todays date?

Regrdas
Post #1373221
Posted Tuesday, October 16, 2012 8:03 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Friday, July 25, 2014 6:57 AM
Points: 1,163, Visits: 1,188
=DateAdd("d", 15, Now)

HTH,
Rob
Post #1373283
Posted Tuesday, October 16, 2012 8:19 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, December 24, 2013 4:56 AM
Points: 178, Visits: 668

Thanks

=DateAdd("d", 15, Today)
Works also

Regards
Post #1373302
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse