Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
VishalWaghole
Specialist II

Character to Date

Dear friends,

Its Urgent for me, if anybody know then please help us.

How can i convert Character formate into Date Formate in QlikView.

Thanks and Regards,

Vishal

6 Replies
swuehl
MVP

Use the date#() function:

Date#(DATEASCHAR,'YYYY-MM-DD') as DateAsQVDate,

please check the QV date and time format codes to create an appropriate format code string.

--

Stefan

Anonymous
Not applicable

Hi Vishal,

You can use the Date#() format to tell QlikView how to interpret a string as a date value (See the F1 help for examples), and then use Date() to format this into the date format you want.

its_anandrjs

Hi,

Use Date# function like

Date#(Datefield , 'DD/MM/YYYY')

But first check what is your date format in DateFormat variable according to that put date format

SET DateFormat='DD/MM/YYYY';

Regards,

Anand

martin59
Specialist II

Hi Vishal,

You have to use date#() function.

For example, if your date field is like this : '20130218' (in text format).

Use the function to convert to date format like this :

Date#(FieldName, 'YYYYMMDD') as FieldName // the 2nd parameter is the input format

Your field is now numeric, if you want to modify the output format, you have to do this :

Date(Date#(FieldName, 'YYYYMMDD'),'DD/MM/YYYY') as FieldName // the output format will be DD/MM/YYYY

Hope that helps you

Martin Favier

martin59
Specialist II

Hi Vishal,

You have to use date#() function.

For example, if your date field is like this : '20130218' (in text format).

Use the function to convert to date format like this :

Date#(FieldName, 'YYYYMMDD') as FieldName // the 2nd parameter is the input format

Your field is now numeric, if you want to modify the output format, you have to do this :

Date(Date#(FieldName, 'YYYYMMDD'),'DD/MM/YYYY') as FieldName // the output format will be DD/MM/YYYY

Hope that helps you

Martin Favier

Sokkorn
Master

Hi Vishal,

Test this one : Date(Date#('18-02-2013','dd-MM-yyyy'),'dd/MM/yyyy')

Try to convert with your field : Date(Date#(MyDate,'dd-MM-yyyy'),'dd/MM/yyyy')

Regards,

Sokkorn