Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Date format from csv

Hello,

I have csv file with format date like 1/2/2012 15:27

Qlikview recognises it like text.

I used load script

date(date#(created_at,'YYYY-MM-DD')) as creationdate1,

It didn't work.

Who knows what should to do?

Thanks,

1 Solution

Accepted Solutions
Nicole-Smith

date(timestamp#(created_at, 'D/M/YYYY hh:mm'), 'YYYY-MM-DD')

The timestamp#() tells QV how the date is formatted in the .csv.

The date() tells QV how you want it formatted.

View solution in original post

12 Replies
Nicole-Smith

date(timestamp#(created_at, 'D/M/YYYY hh:mm'), 'YYYY-MM-DD')

The timestamp#() tells QV how the date is formatted in the .csv.

The date() tells QV how you want it formatted.

shree909
Partner - Specialist II
Partner - Specialist II

Hi use this

You need to specify the same date format that has in csv file..

date(date#(created_at,'M/D/YYYY'),'MM/DD/YYYY')

Anonymous
Not applicable
Author

Hello again,

I need to calculate week.

I tried to use as you suggested

dual(WeekStart(date(timestamp#(created_at, 'D/M/YYYY hh:mm'), 'YYYY-MM-DD'))& '-'  &WeekEnd(date(timestamp#(created_at, 'D/M/YYYY hh:mm'), 'YYYY-MM-DD')),

     WeekStart(date(timestamp#(created_at, 'D/M/YYYY hh:mm'), 'YYYY-MM-DD')))as WEEK

but it doesn't recognize like date

What's wrong this dual function?

Thanks

Anonymous
Not applicable
Author

Any ideas?

rustyfishbones
Master II
Master II

Whwn you say you need to calculate Week is it a date field or a numeric field

Do you want to calculate Sales this week or just add the week number using the date

to add the WeekNumber try,

Week.png

if you want to calculate Sales this week it would be like this

Week1.png

Anonymous
Not applicable
Author

In csv file: my field created_at looks like 04/09/2011  6:47:00 PM. When I open it in excel, format cell is custom.

Excel thinks it text field, because it suggests to sort from A or Z.

I need to see first day and last day of the week and also I need sort it by asc or desc.

Thanks,

Anonymous
Not applicable
Author

Sorry, but it didn't work. It recodes only untill 4/12/2013 -> 2013-12-04.

I don't know why?

Anonymous
Not applicable
Author

Maybe I need to change somewhere settings for date format?

rustyfishbones
Master II
Master II

Try this video I made on YouTube that may help

http://youtu.be/Xchd-X4FwC4