Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
How to convert date field from '' to 'YYYYMM'
I have use this in qliksense load script but its not working -
Date(Date#(CLAIM_DATE_RECORDED,'MM/DD/YYYY hh.mm.ss'),'YYYYMMDD') as CLAIM_DATE_RECORDED_DATE,
Date(Date#(CLAIM_DATE_RECORDED,'MM/DD/YYYY hh.mm.ss'),'YYYYMM') as CLAIM_DATE_RECORDED_YRMN
Please kindly assist
Assuming the issue is the time component being visible and the conversion from text to date/time is ok, use floor() to remove the time component eg
Date(Floor(Date#(CLAIM_DATE_RECORDED,'MM/DD/YYYY hh.mm.ss')),'YYYYMMDD') as CLAIM_DATE_RECORDED_DATE,
Hi
Try this.
Timestamp(Timestamp#(CLAIM_DATE_RECORDED,'MM/DD/YYYY hh:mm:ss TT'),'YYYYMMDD') as CLAIM_DATE_RECORDED_DATE,
Timestamp(Timestamp#(CLAIM_DATE_RECORDED,'MM/DD/YYYY hh:mm:ss TT'),'YYYYMM') as CLAIM_DATE_RECORDED_YRMN
Assuming the issue is the time component being visible and the conversion from text to date/time is ok, use floor() to remove the time component eg
Date(Floor(Date#(CLAIM_DATE_RECORDED,'MM/DD/YYYY hh.mm.ss')),'YYYYMMDD') as CLAIM_DATE_RECORDED_DATE,
It didn't work
didn't work
What is your date format? can you send one sample?
Sample file