Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have a problem with the date's format and my filter date to date.
My date format is : DD/MM/YYY hh:mm:ss and I can't change it in the load script. But with the calendar tool of Qlikview, when I select a date and put it in a variable I have the format DD/MM/YYY.
And then when I have my start date and my end date I use :
='>=$(=date($(vStartDated2))) <=$(=date($(vEndDated2)))'
To select all the date between start and end.
How can I change the format of a variable, or add the hh:mm:ss to my 2 variables ?
If someone have an idea !
Thank you in advance.
If you really need these timestamp then keep them but to use dates you will need dates and not a timestamp. Therefore I suggest to create two further fields with:
date(floor(YourTimestampField)) as Date,
time(frac(YourTimestampField)) as Time
- Marcus
No I don't need it, sorry i didn't mention it, but the hh:mm:ss is not used at all.
So you suggest to create a new filed in the load script with :
date(floor(YourTimestampField)) as Date,
The thing when I try to change the format in the load script with Date(date_saisie) as date_saisie it doesn't work, I have a error during the load.
You are missing the floor-function which will cut the time-part from the value then date is only a formatting-function for dates and couldn't handle the timestamp. Therefore try this:
Date(floor(date_saisie))
- Marcus