Page 1 of 1
DateDiff function
Posted: Tue Apr 08, 2008 10:55 am
by Sandy Pham
In the report writer, how can I do a DateDiff?
For example, I want to show how old something is by doing DateDiff(Today, CreatedDateTime).
Thanks!
Sandy
DateDiff function
Posted: Tue Apr 08, 2008 12:12 pm
by Brendan
The following post shows how it can be achieved using the VB compatibility assembly.
http://forum.stimulsoft.com/Default.aspx?g=posts&t=194
To accomplish the same with c# and the framework the following can be used
Code: Select all
{DateTime.Today.Subtract(CreatedDateTime).Days}
Subtract() will return a TimeSpan object and from that you can check for days, hours, minutes, etc.
DateDiff function
Posted: Wed Apr 09, 2008 11:27 am
by Sandy Pham
Whew, that is a relief. My customer was really mad at me and lecturing me on how that should be an essential feature in any report writer.
It would be really nice if these DateTime functions were listed as part of the system functions you provide in the GUI.
Thanks!
Sandy
DateDiff function
Posted: Wed Apr 09, 2008 4:47 pm
by Vital
Sandy wrote:Whew, that is a relief. My customer was really mad at me and lecturing me on how that should be an essential feature in any report writer.
It would be really nice if these DateTime functions were listed as part of the system functions you provide in the GUI.
Added. Please check build from 10 April.
Thank you.
DateDiff function
Posted: Fri Jun 27, 2008 4:37 am
by jellis
Hi,
I'm looking for the date functions in the expression builder (specifically DateDiff) and can't find them. Do I still need to use the long method listed in this thread, or can you tell me how to access them?
Regards,
Jon.
DateDiff function
Posted: Fri Jun 27, 2008 5:03 am
by Edward
Hello, Jon.
In the prerelease builds started from April, 10th the DateDiff function is available:
Thank you.
DateDiff function
Posted: Fri Jun 27, 2008 5:08 am
by jellis
thanks edward, I'll log in & get that build.