Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

formatting date 1-1-2012 to 1-jan-2012

Hi Guys,

I've a simple question (I hope) ,

How can I convert a date, with the month name in it?

For example I the following data:

originaldatecorrectly formatted
1-1-2012 0:00:0001-jan-2012

I used the following expression to achieve this:

date(Date#(date, 'DD-MM-YYYY hh:mm:ss'),'DD') & '-' & Month(date) & '-' & year(date)

I was just curious whether I could use a simpler expression

Thanks in advance!

Carter

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Have a look at the format codes in the Help, please, I think you can use something like

date(Date#(date, 'DD-MM-YYYY hh:mm:ss'),'DD-MMM-YYYY')

View solution in original post

2 Replies
swuehl
MVP
MVP

Have a look at the format codes in the Help, please, I think you can use something like

date(Date#(date, 'DD-MM-YYYY hh:mm:ss'),'DD-MMM-YYYY')

Not applicable
Author

Hi Stefan,

I did, but appreatly not good enough.

I knew that in Excel 'MMM' would return the month name, but wasn't sure whether QV would do the same. Should have tried it before posting a question on the forum.

Like always, many Thanks for you help!

Carter