DateTimeSpan

EleEle Junior Member
edited December 31, 1969 in Designing Analytics Reports
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

Comments

  • VirgilVirgil Administrator EM admin
    edited December 31, 1969
    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);

    Virgil Dodson
    OpenText Analytics Developer Community
    https://forums.opentext.com/forums/categories/analytics

  • EleEle Junior Member
    edited December 31, 1969
    Thankss¡¡¡¡¡
Sign In or Register to comment.