Get Today's Date?

Stimulsoft Reports.NET discussion
Post Reply
User avatar
jp2code
Posts: 20
Joined: Thu Feb 11, 2016 9:10 pm
Location: Longview, TX [USA]

Get Today's Date?

Post by jp2code »

How do I get "today's date" for a default parameter in a report?
~Joe
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Get Today's Date?

Post by HighAley »

Hello, Joe.

You should use Today system variable.

Thank you.
User avatar
jp2code
Posts: 20
Joined: Thu Feb 11, 2016 9:10 pm
Location: Longview, TX [USA]

Re: Get Today's Date?

Post by jp2code »

How would I use that?
Error Setting Key
Error Setting Key
getgreenshot_org.jpg (139.79 KiB) Viewed 7356 times
~Joe
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

Re: Get Today's Date?

Post by Jan »

Hello,

Please create item value with the help of the New Expression button!

Please check attached image.

Let me know about the results!

Thank you.
Attachments
Expression.png
Expression.png (18.16 KiB) Viewed 7355 times
User avatar
jp2code
Posts: 20
Joined: Thu Feb 11, 2016 9:10 pm
Location: Longview, TX [USA]

Re: Get Today's Date?

Post by jp2code »

It would have taken me a long time to have guessed that.

So, now I know how to set my default "End Date" search.

Our default "Start Date" search parameter is supposed to be 30 days before this.

How would I specify 30 days before {Today}? Would I use some combination of "-Today- -30" or "DateSerial(-Today-.Year, -Today-.Month - 1, -Today-.Day)"?
~Joe
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

Re: Get Today's Date?

Post by Jan »

Hello Joe,

Sorry for the misunderstanding. "-Today-" is a how this value will be displayed for the customer. You can use any string for this field.
You can use the following expression to get date time + 30 days:

Today.AddDays(30)

Thank you.
Post Reply