Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

change 01 AUG 2012 to 01/08/2012 format

Hi

There is a medium date field eg.01 AUG 2012 which i want it in this 01/08/2012 format.

Thanks!

1 Solution

Accepted Solutions
Sokkorn
Master
Master

Hi adoteykwame,

Let consider this expression: Date(Date#('01 AUG 2012','DD MMM YYYY'),'dd/MM/yyyy') return 01/08/2012

So you can try

     1. Expression: Date(Date#(YourDateField,'DD MMM YYYY'),'dd/MM/yyyy')

     2. Load script: Date(Date#(YourDateField,'DD MMM YYYY'),'dd/MM/yyyy') AS [Dates]

Hope this help

Regards,

Sokkorn

View solution in original post

7 Replies
sujeetsingh
Master III
Master III

Try to use Date() and Date#() functions ...It will help you.

Not applicable
Author

This seems to work

= DATE(DATE#(Mydate,'DD MMM YYYY'), 'DD/MM/YYYY')

Cheers

nirav_bhimani
Partner - Specialist
Partner - Specialist

Hi,

Try This,

Num(Month(Date_Field))

Or Else

if(Month='Jan',1,if(Month='Feb',2,if(Month='Mar,3.........))))))))))))

Regards,

Nirav Bhimani

Sokkorn
Master
Master

Hi adoteykwame,

Let consider this expression: Date(Date#('01 AUG 2012','DD MMM YYYY'),'dd/MM/yyyy') return 01/08/2012

So you can try

     1. Expression: Date(Date#(YourDateField,'DD MMM YYYY'),'dd/MM/yyyy')

     2. Load script: Date(Date#(YourDateField,'DD MMM YYYY'),'dd/MM/yyyy') AS [Dates]

Hope this help

Regards,

Sokkorn

martin59
Specialist II
Specialist II

Hi,

You have to use this expression in your LOAD script :

Data:

LOAD Field1,

     Field2,

     ...,

     Date(Date#(YourDateFied,'DD MMM YYYY'),'DD/MM/YYYY') as Date

FROM Data.qvd (qvd);

Hope that helps you,

Martin Favier

Anonymous
Not applicable
Author

Thanks alot guys especially Sokkorn Cheav and Martin Grape.


Not applicable
Author

Hi,

Try This

Month:

MAPPING LOAD * INLINE [

    Month, num

    AUG, 08

];

tab1:

LOAD * INLINE [

    F1

    01 AUG 2012

];

tab2:

LOAD F1,

           Date(Makedate(SubField(F1,' ',3),applymap('Month',SubField(F1,' ',2)),SubField(F1,' ',1)),'DD-MM-YYYY') AS Date

RESIDENT tab1;

DROP table tab1;

Regards,

Vivek