Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Date Format

Table1:

   

IDNameDate1Date2
1xxx2/12/2015 7:0010/23/2015 12:36
2yyyy7/10/2015 12:2211/2/2015 14:57
3zzzz7/10/2015 12:3811/18/2015 12:31
4mmm7/15/2015 8:5011/30/2015 11:46
5vvvv7/24/2015 11:1612/2/2015 7:15
6xxx7/10/2015 12:3811/2/2015 14:57
7xxx7/15/2015 8:5011/18/2015 12:31

script:

LOAD ID,
Name,
date(Date1,'DD/MM/YYYY') as Date1,
date(Date2,'DD/MM/YYYY') as Date2
FROM
C:\Users\43685481\Desktop\Table1.xlsx
(
ooxml, embedded labels, table is Sheet1);

straight table should have the data like below and wrote the condition to get the output

But,when Iam sending the data to Excel sheet



the date format in Excel sheet shold be displayed like above format.But it is working for filter on Date1 but not on Date2.

could you pls help me to get the same format to date2 as well in Excel.

2 Replies

Re: Date Format

Try this:

LOAD ID,
          Name,
          Date(Floor(TimeStamp#(Date1, 'MM/DD/YYYY hh:mm')),'DD/MM/YYYY') as Date1,
          Date(Floor(TimeStamp#(Date2, 'MM/DD/YYYY hh:mm')),'DD/MM/YYYY') as Date2
FROM
C:\Users\43685481\Desktop\Table1.xlsx

(ooxml, embedded labels, table is Sheet1);

Employee
Employee

Re: Date Format

You format seems to be (MM/DD/YYYY) 2/12/2015 7:00  

Community Browser