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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

date format issue,request help

hi,

I have  a field in the below format.I need to extract the following dates as only monthnames.How could I do please can someone help me out??

eg:1/1/2014 12:00:00 AM= January

    2/1/2014 12:00:00 AM =February etc

fieldA

1/1/2014 12:00:00 AM

2/1/2014 12:00:00 AM

3/1/2014 12:00:00 AM

4/1/2014 9:51:48 AM

1/1/2015 12:00:00 AM

2/1/2015 12:00:00 AM

3/1/201512:00:00 AM

4/1/2015 9:51:48 AM

.......

regards,

Sahana

1 Solution

Accepted Solutions
sushil353
Master II
Master II

Hi ,

Try this:

Date(Date#(fieldA,'DD/MM/YYYY hh:mm:ss TT'),'MMMM')

HTH

Sushil

View solution in original post

8 Replies
sushil353
Master II
Master II

Hi ,

Try this:

Date(Date#(fieldA,'DD/MM/YYYY hh:mm:ss TT'),'MMMM')

HTH

Sushil

PrashantSangle

Hi ,

Try this:

Date(Date#(fieldA,'MM/DD/YYYY hh:mm:ss TT'),'MMMM')

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Not applicable
Author

Hi ,

you need to add the below condition into your script

Date(Date#(fieldA,'DD/MM/YYYY hh:mm:ss TT')'MMMM') as MonthName

Regards

Charitha

senpradip007
Specialist III
Specialist III

You can use:

Date(fieldA, 'MMMM')

sushil353
Master II
Master II

There is one another way:

Edit your initial variables with full month name

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

And then simply use:

Month(fieldA)

HTH

Sushil

Not applicable
Author

Hi,

Try conversion using this code DATE(DATE#(SUBFIELD(FieldA,' ',1),'MM/DD/YYYY'),'MMM')

Not applicable
Author

yes , if you have all the data is in the same format (dd/mm/yyyy) then no need to use date#, directly we can apply date() on specific otherwise need to convert the date into same format of all values.

-Charitha

senpradip007
Specialist III
Specialist III

Hi Lakshmi,

As Sahana did not mention that the date can be in dual format, I'm using only date(). Otherwise date# will come into play.

-PS