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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

problem with date format,need help please!

hi,

I have a field coming from  a csv file to my script having data in below format

1/14/2015  12:00:00 AM

I want to change this by removing the time stamp from it and make it to result date in

dd/mm/yyyy format.

how can this be done?? please can someone help

sahana

1 Solution

Accepted Solutions
simenkg
Specialist
Specialist

try Date(Date#(subfield(Field,' ',1),'MM/DD/YYYY'),'DD/MM/YYYY')

View solution in original post

16 Replies
avinashelite

Hi Sahana,

Use date(field,'DD/MM/YYYY') as fieldname in the script this will do the job,

amit_saini
Master III
Master III

Sahana,

Try this,

Date(Your_Date _Field, 'DD/MM/YYYY') as  Date,

Thanks,

AS

Not applicable
Author

hi Avinash

I have tied it but it doesnt work.I have also tried

DATE(FLOOR(Timestamp#(field,'MM/DD/YYYY hh:mm:ss TT') ))

avinashelite

can you please post your app.

amit_saini
Master III
Master III

Please see the attachment.

Go to properties--> Number-->Select Date as decide format.

Thanks,
AS

amit_saini
Master III
Master III

Please see the screenshot:

Not applicable
Author

In script you can have a look,I have 2 columns.

Expiry,

date(Expiry,'DD/MM/YYYY') as Expiry1 ,

but Expiry1 doesnt work.

ashfaq_haseeb
Champion III
Champion III

Hi,

Can you attache your sample csv with few dated .

Regards

ASHFAQ

Not applicable
Author

hi Amit,

I want to do this conversion in the script level,where I would be using to join with other tables etc.Hence the issue.