Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

date

Hello all,

     i want to remove timestamp form date field as shown in an image and convert it into proper date format ,how can i achieve this ??

comunnity.png

Labels (1)
1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

The best way is to do this in the script:

load

     ...some fields...,

     date(floor(UploadDate),'DD-MM-YYYY') as MyDate

from ...somewhere...;

Replace DD-MM-YYYY with the date format you really want.

edit: it looks like your timestamp is actually a string value. In that case try date#(left(UploadDate,11),'DD-MM-YYYY')


talk is cheap, supply exceeds demand

View solution in original post

16 Replies
Roop
Specialist
Specialist

There seems to be a problem with the image, but you use the date# function to convert into a date and the date function to change the format.

Hope this helps

its_anandrjs
Champion III
Champion III

Write like

Date(Date#(UploadDate,'MMM DD YYYY hh:mmTT'),'DD/MM/YYYY')

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

The best way is to do this in the script:

load

     ...some fields...,

     date(floor(UploadDate),'DD-MM-YYYY') as MyDate

from ...somewhere...;

Replace DD-MM-YYYY with the date format you really want.

edit: it looks like your timestamp is actually a string value. In that case try date#(left(UploadDate,11),'DD-MM-YYYY')


talk is cheap, supply exceeds demand
Not applicable
Author

try Date(now(),'MMM DD YYYY')

its_anandrjs
Champion III
Champion III

Load like below script

LOAD *,Date(Date#(UploadDate,'MMM DD YYYY hh:mmTT'),'DD/MM/YYYY') as Newdate;

LOAD * Inline

[

UploadDate

Aug 16 2013 3:56PM

Dec 12 2013 6:08PM

Dec 24 2013 9:07PM

Dec 28 2013 5:24PM

];

Not applicable
Author

Hi rohit,

use Date() and Date#()

Date(Date#(UploadDate,'MMM DD YYYY hh:mmTT'),'DD-MM-YYYY') as NewDateDate.bmp

arjunkrishnan
Partner - Creator II
Partner - Creator II

Hai Frd This One Usuful For u...

SET DateFormat='DD/MMM/YYYY';

SET TimestampFormat='DD/MMM/YYYY hh:mm:ss[.fff]';

U May U Want See Only The Date Means

DATE([DateField],'$(DateFormat)') as NewFieldName,

O/P Like That

U May U Want See Only The Date & Timestamp Means

DATE([DateField],'$(TimestampFormat)') as NewFieldName,

O/P Like That

its_anandrjs
Champion III
Champion III

When using below script

LOAD *,Date(Date#(UploadDate,'MMM DD YYYY hh:mmTT'),'DD/MM/YYYY') as Newdate;

LOAD * Inline

[

UploadDate

Aug 16 2013 3:56PM

Dec 12 2013 6:08PM

Dec 24 2013 9:07PM

Dec 28 2013 5:24PM

];

You get change in date column like this

NewTransform.png

Not applicable
Author

thanks anand ,but its only working for some dates for the rest its displaying null values