Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
nagarajupinnibo
Creator
Creator

Convert Datetime to date

Hi,

Actually datefield contains value as '2013-08-21T18:36:15'

But, I need only date as '2013-08-21'.

I used Date() function inside Load statement,but Iam not getting exact value..

I need to apply function inside Load statement..

Please provide the solution for it..

Thanks

Nagaraju

1 Solution

Accepted Solutions
8 Replies
Anonymous
Not applicable

If Date doesn't worked then you can try with Left(datefield,10)

Not applicable

Try this

Date(Datefield,'yyyy-mm-dd') as newDate

Hope it will help

maxgro
MVP
MVP

= date(date#(left('2013-08-21T18:36:15',10),'YYYY-MM-DD'), 'YYYY-MM-DD')

EDIT: in a load

LOAD

     ....

     date(date#(left('2013-08-21T18:36:15',10),'YYYY-MM-DD'), 'YYYY-MM-DD') as newdatefield,

     ......

FROM

     ....

replace '2013-08-21T18:36:15' with the field

MK_QSL
MVP
MVP

Use below in your script....

Date(Date#(Left(2013-08-21T18:36:15,,10),'YYYY-MM-DD')) as Date

its_anandrjs

Use in load script like

Load


Date(Date#(Left('2013-08-21T18:36:15',10),'YYYY-MM-DD'), 'YYYY-MM-DD') as UpdatedDatefield,

Left(YourdateField,10) as NewDatefield


From Location;

rustyfishbones
Master II
Master II

try

2014-04-25_1020.png

nagarajupinnibo
Creator
Creator
Author

Thanks to all.. Now,Its working fine.

Thanks

Nagaraju

its_anandrjs

If you got correct answer from thread so mark Correct / Helpful for reference.

Regards