Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Help With date Formatting

Hi I am very new to qlikview application so pardon my ignorance.I loaded data from csv files to qlikview application and kept the date format as M/DD/YYYY which is coming as Jan 1,2011 while I display in list box one of the date objects.Surprisingly I am unable to do any date operation on that field.Whenever I am trying to find week,month of that date field it is returning NULL.Am I missing something?My ultimate aim is to find last 4 weeks date based on a selection of that date field.Any help is highly appreciated

1 Solution

Accepted Solutions
Miguel_Angel_Baeyens

Hi,

Using the date format from the input CSVs will require some formatting in the LOAD:

Table:

LOAD Date(Date#(DateField, 'MMM D, YYYY')) AS Date

FROM File.csv;

Now you can add or subtract to dates, and calculate with them.

Hope that helps.

Miguel Angel Baeyens

BI Consultant

Comex Grupo Ibérica

View solution in original post

3 Replies
Miguel_Angel_Baeyens

Hi,

Using the date format from the input CSVs will require some formatting in the LOAD:

Table:

LOAD Date(Date#(DateField, 'MMM D, YYYY')) AS Date

FROM File.csv;

Now you can add or subtract to dates, and calculate with them.

Hope that helps.

Miguel Angel Baeyens

BI Consultant

Comex Grupo Ibérica

rohit214
Creator III
Creator III

hi

table1:

LOAD

Date(Datefield,'MM/DD/YYYY) ad Date

or go to Properties>>>Number>>>checked date..and write your date format as per your requirment

thanks

rohit

Not applicable
Author

Thanks Miguel that worked like a charm.But now I have one more problem.What I am trying to do is I have a date field in a list box coming from a clone of original calendar table.The calendar table date is used in the report.Now I want a mechanism so that  when user selects a date from list box I need to restrict data in the report from selected date to 4 weeks period.I tried the same with calculated dimension without any luck.Please find the attached QVW file.It would be very helpful if you can suggest some steps to achieve that.I am using the personal edition so won't be able to download more than 3 personal edition files.