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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
robert_mika
MVP
MVP

Covert to a Date Format

What's is the best way to covert string text

Oct/21/2014

at the Load level

to read

21-Oct-2014

Labels (1)
1 Solution

Accepted Solutions
its_anandrjs
Champion III
Champion III

Try this way with Date# and Date functions.

Ex:-

Table:

LOAD Date(Date#(DateField,'MMM/DD/YYYY'),'DD-MMM-YYYY') as NewDate,DateField;

LOAD * Inline

[

DateField

Oct/21/2014

];

View solution in original post

4 Replies
alexandros17
Partner - Champion III
Partner - Champion III

No best but different ways depending on your need, a quick way is using Date(date, format) ....

its_anandrjs
Champion III
Champion III

Try this way with Date# and Date functions.

Ex:-

Table:

LOAD Date(Date#(DateField,'MMM/DD/YYYY'),'DD-MMM-YYYY') as NewDate,DateField;

LOAD * Inline

[

DateField

Oct/21/2014

];

er_mohit
Master II
Master II

Hi

Use Data and Date # function l

try this in text object

=Date(Date#('Oct/21/2014','MMM/DD/YYYY'),'DD-MMM-YYYY')

and same can do in load level just replace date string with your Datefield  like

Date(Date#(DateField,'MMM/DD/YYYY'),'DD-MMM-YYYY') as Date

maxgro
MVP
MVP

you need 2 function

date#      interpretation function from string to number

and then

date        formatting function from number to string

in the attachment more detail

you already get the answer in previous post (replace 'Oct/21/2014' with your field)

load

     ...

     date(date#('Oct/21/2014', 'MMM/DD/YYYY'), 'DD-MMM-YYYY') as NewDate

     .....

from

     ....