Home
Analytics
DateTimeSpan
Ele
Hi all¡
I'm trying to use the BIRT function DateTimeSpan.days(startDate, endDate) but I don't know which is the proper format of startDate and endDate.
Any help?
Thenk you all¡
Elena
Find more posts tagged with
Comments
Virgil Dodson
Hi Elena,
Generally, if you are selecting Date fields from the database, you can just use syntax like:
DateTimeSpan.days(row["ORDERDATE"],row["SHIPPEDDATE"])
...but if you are working with String dates and need to do some conversion, then remember that the DateTimeSpan.days method takes Date Objects... like the example below.
var mydate1 = new Date("11/18/2007");
var mydate2 = new Date("12/04/2007");
DateTimeSpan.days(mydate1,mydate2);
Ele
Thankss¡¡¡¡¡