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

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Date issu

Hi,

I've the date in my DB as yy-mm-dd  (15-04-01) When i load that into qv i get a 5 digit number starting with 6.

I know that it the date as text.

So I try to set in load script

date(date#(MYDATE,'YY-MM-DD'),'YYYY-MM-DD') as [realdate], but realdate is empty after load.

If I change in load to

date(date#(MYDATE,'YYMMDD'),'YYYY-MM-DD') as [realdate], the year comes as 1970

I'm sure it's something simple but I cant figue it out.

Please help

16 Replies
Not applicable
Author

here it the qv file

Not applicable
Author

save data in to QVD and share that qvd  as well .because we need to do reload after written some sort of function

Not applicable
Author

and the qvd 😃

Not applicable
Author

HI

date1 as the final output field

PFA

let me know for any concerns 

Thanks

Manju

sasiparupudi1
Master III
Master III

what is the database that your are using?

sasiparupudi1
Master III
Master III

Hi

Unix dates require subtraction of dates 1970-01-01

try if this gives you a correct value?

date(num#(Utlastningsdatum)-num(floor(MakeDate(1970,1,1))))

settu_periasamy
Master III
Master III

Hi,

Try this.

LOAD HUFTID,

     HULSÄT,

     Utlastningsdatum,

     TimeStamp(Makedate(1970,1,1)+ num#(Utlastningsdatum)/86400) as Date_Time,

     Postnummer,

     FYear,

     fungera,

     FMonth,

     realdate,

     FYearMonth,

     Fakturadatum,

     HUFILI

FROM

test.qvd

(qvd);