Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Converting date format problem

Hi everyone,

i have a really big date data with DD.M.YYYY format and i need DD.MM.YYYY format. But QV does not interpret the date format in the right way. i tried all of the possible scipts that i know, after that i've seen nothing.

Here are the screenshots. (Second column with no scripts)

I have DD.M.YYYY, I need to convert DD.MM.YYYY.

Dates-Excel.JPGDates-Qv.JPG

1 Solution

Accepted Solutions

Re: Converting date format problem

If it's already a date you could simply use date(YourdateField, 'DD.MM.YYYY') and if it's not then:

date(date#(YourdateField, 'YYYY/MM/DD'), 'DD.MM.YYYY')

- Marcus

4 Replies

Re: Converting date format problem

If it's already a date you could simply use date(YourdateField, 'DD.MM.YYYY') and if it's not then:

date(date#(YourdateField, 'YYYY/MM/DD'), 'DD.MM.YYYY')

- Marcus

MVP
MVP

Re: Converting date format problem

try the bold

source:

load * inline [

d

14.7.2014

1.7.2014

14.12.2014

1.12.2014

];

final:

load

  d,

  Date(Date#(d, 'DD.M.YYYY'), 'DD.MM.YYYY') as newd

Resident source;

DROP Table source;

1.png

sasiparupudi1
Honored Contributor III

Re: Converting date format problem

May be there are some leading/trailing spaces in the date string?

date(date#(trim(PostedDate), 'DD.M.YYYY'), 'DD.MM.YYYY')


or if you have your date in the YYYY/MM/DD format, try the following

date(date#(PostedDate, 'YYYY/MM/DD'), 'DD.MM.YYYY')



hth

Sasi

Not applicable

Re: Converting date format problem

Thank you all, date(date#(PostedDate, 'YYYY/MM/DD'), 'DD.MM.YYYY') this one helped me.

Best Regards

Gizem

Community Browser