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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources 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
arulsettu
Master III
Master III

this works for me

date(Date#('15-04-01','yy-mm-dd'),'YYYY/MM/DD')

Not applicable
Author

mydate = the columnamne in the database.

Can't get it to work.

Might be that the date is set as text in the DB

arulsettu
Master III
Master III

can you post your sample data

senpradip007
Specialist III
Specialist III

You can try with

MakeDate(2000+left(MYDATE, 2), mid(MYDATE, 4, 2), right(MYDATE, 2)) as realdate

maxgro
MVP
MVP

post a .qvw where you load some data from your db

load

     MYDATE,

     text(MYDATE),

     date(date#(MYDATE, 'YY-MM-DD'),'YYYY-MM-DD') as [realdate]

from ....

sasiparupudi1
Master III
Master III

Try


date(MYDATE,'YYYY-MM-DD') as [realdate]

prma7799
Master III
Master III

please share some test data.

Not applicable
Author

can you post some sample file so that we can able to help you

engishfaque
Specialist III
Specialist III

Dear Johan,

Please use,

Date(Floor(Date#(YourDateFieldName,'YY-MM-DD')))

Kind regards,

Ishfaque Ahmed