Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Help me to load dates in qliksense

Hi,

I need help on two items

1) I am trying to adjust the width of a column in Table, I tried to expand width of column as we do in excel , but I could not do it (I am expecting mouse arrow to convert as hand arrow so that i can drag ) . Please let me know how we can increase the width?

2) My second problem is data issue, as shown in picture QS read the date as 08/20/2015 where as in source file it is 01/20/2015.

Code I used to load this field is :

    Date(min([Sent on]),'MM/DD/YYYY HH:MM') as [First Time Replied]

Can any one tell me why Month part is changed here?

1 Solution

Accepted Solutions
martinien
Partner - Contributor III
Partner - Contributor III

Hi,

I think your error lies here:

    date#("Date Received", 'm/d/yyyy h:mm') as [Date Received],

the first m should be M . Here it is interpreted as minute, not month.

I would suggest to use the following

date#("Date Received", 'M/D/YYYY h:mm') as [Date Received],

Martin

View solution in original post

4 Replies
Not applicable
Author

Through the thread QlikSense-Increasing the No. of columns in Table I got solution for problem 1. Take away is in QS 1.0.2 we can't change the column width of a Table.

Still waiting experts to help me on second issue

martinien
Partner - Contributor III
Partner - Contributor III

Hi,

What's the date format in your data source?

You may want to use the date#() function on it before using date() .

Regards,

Martin

Not applicable
Author

Hi,

I used date#() to read dates from source CSV file.

Full code is here:

[Sentbox]:

LOAD

IF (match(LEFT(Subject,3),'RE:', 'Re:', 're:','rE:'),MID(Subject,4),Subject)

as Subject,

    [Sent on],

    "To (address)",

    [Date Received],

    "From (address)"

;

LOAD

    Subject,

   DATE (alt( date#("Date Sent",'M/D/YYYY HH:MM'),date#("Date Sent",'m/d/yyyy h:mm')),'MM/DD/YYYY h:mm') as [Sent on],

    "To (address)",

    date#("Date Received", 'm/d/yyyy h:mm') as [Date Received],

    "From (address)"

FROM [lib://Data/Deloitte_sentbox.csv]

(txt, codepage is 1252, embedded labels, delimiter is ',', msq) ;

RIGHT JOIN ([MIN_INBOX])

[MIN_SENTBOX]:

LOAD

    Subject,

   Date(min([Sent on]),'MM/DD/YYYY HH:MM') as [First Time Replied]

RESIDENT [Sentbox]

GROUP BY

    Subject

;

DROP TABLES [Sentbox];

martinien
Partner - Contributor III
Partner - Contributor III

Hi,

I think your error lies here:

    date#("Date Received", 'm/d/yyyy h:mm') as [Date Received],

the first m should be M . Here it is interpreted as minute, not month.

I would suggest to use the following

date#("Date Received", 'M/D/YYYY h:mm') as [Date Received],

Martin