Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
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

1 Solution

Accepted Solutions
Gysbert_Wassenaar

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

Write like

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

Gysbert_Wassenaar

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

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

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