Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Highlighted
Not applicable

Date format


Hi Guys,

I have data in my excel as 2015-07-04 00:36 format which is M/D/YYYY h:mm:ss[.fff] TT' but suddenly some data came in excel as Sep 7, 2015 5:19:42 PM format so it is not takinf date values that are in new format. if i try to convert to M/D/YYYY it takes only till old format not taking the new format. How can i handle this?

Tags (1)
1 Solution

Accepted Solutions

Re: Date format

May be this:

Date(Alt(Date#(DateField, 'YYYY-MM-DD hh:mm'), Date#(DateField, 'MMM D, YYYY hh:mm:ss TT'))) as DateField

View solution in original post

10 Replies
Not applicable

Re: Date format

Hi,

Try Using Date#() Function

Converting date format

Not applicable

Re: Date format

Hi,

go through this.

The Date Function

Re: Date format

May be this:

Date(Alt(Date#(DateField, 'YYYY-MM-DD hh:mm'), Date#(DateField, 'MMM D, YYYY hh:mm:ss TT'))) as DateField

View solution in original post

sasiparupudi1
Honored Contributor III

Re: Date format

use

alt

alt(timestamp#('07/4/2015 00:36:34.000 AM','M/D/YYYY h:mm:ss[.fff] TT'),timestamp#('Sep 7,2015 5:19:42 PM','MMM DD,YYYY hh:mm:ss TT'))

hth

Sasi

senpradip007
Valued Contributor III

Re: Date format

Try like

alt(Timestamp#(Date, 'yyyy-mm-dd hh:mm'), Timestamp#(Date, 'MMM dd, yyyy h:mm:ss TT')) as NewDate

Not applicable

Re: Date format

can't it be handled without using alt function?

sasiparupudi1
Honored Contributor III

Re: Date format

Correct the date format in the source excel file

Re: Date format

If you don't want to use Alt, you can use If function, but Alt would be an easier route to take

Not applicable

Re: Date format

i mean to say, before whatever format date format data used to come in excel it used to convert to M/D/YYYY but this format it is not converting, user wants us to make it dynamic with whatever format they enter