Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

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

Tags (4)
1 Solution

Accepted Solutions

Re: Help With date Formatting

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

3 Replies

Re: Help With date Formatting

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

Re: Help With date Formatting

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

Re: Help With date Formatting

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.