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

Announcements
Independent validation for trusted, AI-ready data integration. See why IDC named Qlik a Leader: Read the Excerpt!
cancel
Showing results for 
Search instead for 
Did you mean: 
neha_shirsath
Specialist
Specialist

Date Issue

Hi Community,

I need your help.

I have attached the file in that I have Month field like April'13 but i want that in Date format like Apr 2013.

How can I convert that in date format.

Please help.

Thanks In Advance.

-Neha

1 Solution

Accepted Solutions
Sokkorn
Master
Master

Hi Neha,

In load script, let add new field with below code

Date(Date#(Replace(YourDateField,Chr(39),'-'),'MMMM-yy'),'MMM yyyy')AS NewDateField

Regards,

Sokkorn

View solution in original post

6 Replies
SunilChauhan
Champion II
Champion II

left(Month,len(Month)-3)&' '& Right(Month 2) as Month in script

or use in dimension with "as Month"

hope this helps

Sunil Chauhan
Sokkorn
Master
Master

Hi Neha,

In load script, let add new field with below code

Date(Date#(Replace(YourDateField,Chr(39),'-'),'MMMM-yy'),'MMM yyyy')AS NewDateField

Regards,

Sokkorn

hic
Former Employee
Former Employee

First, you need to define the long Month name in the environment:

SET LongMonthNames = 'January;February;March;April;May;June;July;August;September;October;November;December';

Then you can use this in your format code as MMMM. So, in the script you should have

     Date#(Month,'MMMM''YY') as Month2,

HIC

mangalsk
Creator III
Creator III

Hello,

Try this

Date(Date#(YourDateField,'MMM'&chr(39)&'YY'),'MMM yyyy') as newDate

Not applicable

Hi Neha,

You can use following Code to achieve the result.

Date(Date#(Month,'MMM'&chr(39) &'YY'),'MMM YYYY') as YearMonth

-Regards,

Kiran

neha_shirsath
Specialist
Specialist
Author

Hi Sunil,

I have did this. but its not useful in my application as i need it in date format and here it will give in string format.

Thanks for the reply.

-Neha