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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Change text to date

Hi all,

Unfortunately my data source has a "date" field that is text with the following format, ie, October 15, 2012.

How do I make this into a date? I think it would be easier if the Month was standard 3 letters across the board so I could do something to the effect of: date(date#('date', 'MMM/DD/YYYY')) as New_Date but it doesn't seem to work.

Any suggestions? Do I need to nest a ton of left, mid, rights, find(","), etc? Thanks so much.

1 Solution

Accepted Solutions
Not applicable
Author

check this:

=makedate(right(olddate,4),match( left(olddate,index(olddate,' ')-1),'January', 'February','March','April','May','June','July','August','September','October','November','December'),right(left(olddate,index(olddate,',')-1),index(olddate,',')-1-index(olddate,' ')-1))

View solution in original post

3 Replies
Not applicable
Author

check this:

=makedate(right(olddate,4),match( left(olddate,index(olddate,' ')-1),'January', 'February','March','April','May','June','July','August','September','October','November','December'),right(left(olddate,index(olddate,',')-1),index(olddate,',')-1-index(olddate,' ')-1))

CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

Format is available for the full month name also.

Please check this

Date(Date#(datefield, 'MMMM DD, YYYY'))

Hope it helps

Celambarasan

Not applicable
Author

This worked, thanks