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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Date Converter

Hello,

Please i have a field date which contain dates in the format friday,13 March 2013

i want to convert this field to 13/3/2013

how to do that?

Labels (1)
4 Replies
Anonymous
Not applicable
Author

Use date#() function:

date(date#(YourField, 'WWWW, DD MMMM YYYY'),'DD/M/YYYY')

Regards,

Michael

tresB
Champion III
Champion III

Try like :

Load

Date(MakeDate(Right(YourField,4), Num(Month(Date#(Mid(YourField,11,3),'MMM'))) , Mid(YourField,8,2)) , 'DD/MM/YYYY')  as NewDate

From <>;

Edit : Corrected the character positioning and string function

Not applicable
Author

Thanks tresesco and michael

but the problem is the original date field is in mdx query and i load it to qlikview correctly ok

when i try to add additional field to the load script of the mdx it give me the new date field empty

how can i do it? to add additional field to loaded data from mdx query generator

tresB
Champion III
Champion III

Try like this:

Load

          Date(MakeDate(Right(YourField,4), Num(Month(Date#(Mid(YourField,11,3),'MMM'))) , Mid(YourField,8,2)) , 'DD/MM/YYYY')  as NewDate,

          OtherField1,

          OtherField2 ;

SQL Select

                    YourField,   // assuming this is your date field in the DB

                    OtherField1,

                    OtherField2

From <Your orginal DB>;

Note: The new date field can't be done under SQL statement. It has to be under LOAD.