Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

aveeeeeee7en
Valued Contributor III

Date Format

Hi All

I have date field in this Format:    07-08 8-2013 12:44:11

I need date field in this Format:    07-08-2013 12:44:11

Only Month is in different Format.

I am getting desired result by using this:

SubField(SystemClosedDateTime,'-',1)&'-'&Left(SubField(SystemClosedDateTime,'-',2),2)&'-'&Left(SubField(SystemClosedDateTime,'-',3),4)

Is there any other way which will only change the month Format (08 8) and rest Date and Year work as it is.

Regards

Aviral Nag

Tags (1)
1 Solution

Accepted Solutions

Re: Date Format

Hi,

Just write ,

Timestamp(SystemClosedDateTime,'DD-MM-YYYY hh:mm:ss')

Regards,

Regards,
Prashant Sangle
12 Replies
MVP
MVP

Re: Date Format

Try like:

Load

          Date(Floor(Timestamp#(YourDate, 'DD-MM M-YYYY hh:mm:ss'))) as Date

aveeeeeee7en
Valued Contributor III

Re: Date Format

Sir

I need this Format: 07-08-2013 12:44:11

sushil353
Honored Contributor II

Re: Date Format

Hi,

Try this one:

=Date(Date#(SystemClosedDateTime,'DD-MM D-YYYY hh:mm:ss'),'DD-MM-YYYY hh:mm:ss')

HTH

Sushil

MVP
MVP

Re: Date Format

Then try without floor(), like:

Load

          Timestamp(Timestamp#(YourDate, 'DD-MM M-YYYY hh:mm:ss')) as Date

Not applicable

Re: Date Format

did you try

on the load

date(floor (SystemClosedDateTime)) as date,

Re: Date Format

Hi,

Try this,

Timestamp(Timestamp#(DateFieldName, 'DD-MM M-YYYY hh:mm:ss'),'DD-MM-YYYY hh:mm:ss') as newDate

Regards

Regards,
Prashant Sangle
er_mohit
Honored Contributor II

Re: Date Format

Try this in text object

Timestamp(Timestamp#('07-08 8-2013 12:44:11', 'DD-MM f-YYYY hh:mm:ss'))

you get this output 07-08-2013 12:44:11


hope it helps 


aveeeeeee7en
Valued Contributor III

Re: Re: Date Format

Thanks Everyone for the Result.

I've applied everyone's logic but it's not working perfectly.

Kindly, see the Attachment.

Re: Date Format

Hi,

Just write ,

Timestamp(SystemClosedDateTime,'DD-MM-YYYY hh:mm:ss')

Regards,

Regards,
Prashant Sangle
Community Browser