Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
vadim_grab
Creator
Creator

Problems with loading the Dates

Hi,All.

I encountered a problem with loading the dates.

I learned

Why don’t my dates work?

QlikView Date fields

but the problem was not solved!

Any ideas?

My Case:

CSV file with dates:

ОРНК_АНА_13 - Excel 2018-05-12 10.05.37.png

Load Script:

Edit Script [D__Cloud Data Storage_OneDrive_QlikView Development_BaselAero_BaselAero.qvw_] 2018-05-12 09.46.08.png

Result:

QlikView x64 Personal Edition - [D__Cloud Data Storage_OneDrive_QlikView Development_BaselAero_BaselAero.qvw_] 2018-05-12 10.12.31.png

1 Solution

Accepted Solutions
mikaelsc
Specialist
Specialist

in your timestamp#, you don't provide a string format

floor(date#(... will not work. date# is an interpretation function, not a formatting function.

you'd need to date(floor(num(date#()))  (interpret, format as num, floor, format as date)

easiest i think, woul be to interpret and format your field as a timestamp, then calculate whatever you need:

timestamp(timestamp#(YourField,'DD.MM.YYYY hh:mm')) as TimeStampOfYourField

then, calculating dates, months, years, ... would be:

date(floor(TimeStampOfYourField))                              as DateOfYourTimestampField

etc

View solution in original post

2 Replies
mikaelsc
Specialist
Specialist

in your timestamp#, you don't provide a string format

floor(date#(... will not work. date# is an interpretation function, not a formatting function.

you'd need to date(floor(num(date#()))  (interpret, format as num, floor, format as date)

easiest i think, woul be to interpret and format your field as a timestamp, then calculate whatever you need:

timestamp(timestamp#(YourField,'DD.MM.YYYY hh:mm')) as TimeStampOfYourField

then, calculating dates, months, years, ... would be:

date(floor(TimeStampOfYourField))                              as DateOfYourTimestampField

etc

vadim_grab
Creator
Creator
Author

Thanks Mikael!