Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
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
marcus_sommer

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

View solution in original post

4 Replies
marcus_sommer

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

maxgro
MVP
MVP

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
Master III
Master III

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
Author

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

Best Regards

Gizem