Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All!
How I can convert string with format ('EEE, dd MMM yyyy hh:mm:ss Z') into Date or Timestemp?
Example, 'Fri, 6 Mar 2020 11:45:16 +0300'
@phillosopher use the date() function
EX: Date(Field, 'MM/DD/YYYY') would return 03/13/2020.
In Qlik Sense you would have to turn your string into some kind of date format it recognises - YYYY-MM-DD hh:mm[:ss[.fff]]
So in your load script something like this
map:
mapping load * INLINE
[
Month, Number
Jan, 01
Feb, 02
Mar, 03
Apr, 04
] (delimiter is ',');
[Data]:
LOAD * INLINE
[
Brand_Weeks,LAST_UNIQUE, Date
47,5, 'Fri, 6 Mar 2020 11:45:16 +0300',
48,20, 'Sat, 7 Mar 2020 11:45:16 +0300'
49,56, 'Sun, 8 Mar 2020 11:45:16 +0300'
50,7Fri, 'Mon, 9 Mar 2020 11:45:16 +0300'
](delimiter is ',');
Final:
load *,
MakeDate(mid(Date,12,4),ApplyMap('map',mid(Date,8,3)), mid(Date,6,2)) as Datenew
Resident Data; drop Table Data;