Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
nicouek
Creator
Creator

Date Conversion

Hello all,

I recently appended a REST API source data to an Excel Flat file for an incremental load setup, however it seems the date format in the REST API  source is different from the format present in the Excel file. Qlik Sense output is as seen below:

nicouek_0-1694028051871.png

 I need help converting both dates into one standard date.

Please help... Thank you

Labels (2)
1 Solution

Accepted Solutions
Vegar
MVP
MVP

You should consider handling this in the script. Take a look at my script samples below, they might help you.

Set TimestampFormat='MM-DD-YYYY hh:mm:ss';

Set DateFormat ='DD/MM/YYYY';

LOAD dayname(datefield) as DATE, ...

Or as @BrunPierre  suggest, like this.

LOAD

Date(Alt(Floor(datefield), Floor(TimeStamp#(datefield, 'MM-DD-YYYY hh:mm:ss'))), 'DD/MM/YYYY') as DATE,  ...

View solution in original post

2 Replies
BrunPierre
Partner - Master II
Partner - Master II

Try

=Date(Alt(Floor(Date), Date(Floor(TimeStamp#(Date, 'MM-DD-YYYY hh:mm:ss')))), 'DD/MM/YYYY')

Vegar
MVP
MVP

You should consider handling this in the script. Take a look at my script samples below, they might help you.

Set TimestampFormat='MM-DD-YYYY hh:mm:ss';

Set DateFormat ='DD/MM/YYYY';

LOAD dayname(datefield) as DATE, ...

Or as @BrunPierre  suggest, like this.

LOAD

Date(Alt(Floor(datefield), Floor(TimeStamp#(datefield, 'MM-DD-YYYY hh:mm:ss'))), 'DD/MM/YYYY') as DATE,  ...