Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

date format and date differences

hi all,

at the attached qw

i wanna

1)change Date format to DD/MM/YYYY

then

2) For every pilot i want to find

    a) the differences of dates

    b)sum of the differences of dates

    c)row number

     d)  b/c

you can find an axample at the excel

can u please help me thanks

1 Solution

Accepted Solutions
pover
Luminary Alumni
Luminary Alumni

I would recommend you do this in the script and not in the object, but you can use the following code to standardize your dates either in the script or as a calculated dimension.

=alt(date(Date,'MM/DD/YYYY'),date(floor(timestamp#(Date,'MM/DD/YYYY hh:mm:ss tt')),'MM/DD/YYYY'))

It's so complicated because some of your dates are strings and others are numbers.  Try to make the dates the same format in the source Excel file.

The rest of the graph is complicated for that reason, so I've attached the QV.

Karl

View solution in original post

2 Replies
pover
Luminary Alumni
Luminary Alumni

I would recommend you do this in the script and not in the object, but you can use the following code to standardize your dates either in the script or as a calculated dimension.

=alt(date(Date,'MM/DD/YYYY'),date(floor(timestamp#(Date,'MM/DD/YYYY hh:mm:ss tt')),'MM/DD/YYYY'))

It's so complicated because some of your dates are strings and others are numbers.  Try to make the dates the same format in the source Excel file.

The rest of the graph is complicated for that reason, so I've attached the QV.

Karl

Not applicable
Author

thank you very much