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: 
Anonymous
Not applicable

Date Format Not Working

Hi,

I have a question about converting date format in load script.

I have a data like this:

data tanggal.png

i want to convert the data into this format : dd-MM-yyyy

I've try using this date() function like this in load script

--> Date(Floor(Date#(Trim(MyDATE), 'YYYY/MM/DD hh:mm:ss')), 'dd-MM-yyyy')

but it returns null

null tanggal.png

Any idea to solve this problem ?

Really appreciate your help, thanks

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Try like:

Date(Floor(Num(Trim(MyDATE))), 'dd-MM-yyyy')

View solution in original post

9 Replies
tresesco
MVP
MVP

Try like:

Date(Floor(Num(Trim(MyDATE))), 'dd-MM-yyyy')

robert_mika
Master III
Master III

Try use floor first

date(floor(MyDATE),'DD-MM-YYYY') AS CalendarDate

Peter_Cammaert
Partner - Champion III
Partner - Champion III

or

DayStart(MyDATE)

QlikView should automatically recognise your field values as numbers, and dates/times/timestamps are numerical values anyway. If possible, let QV do the work.

Peter

[Edit]: I'm assuming that your default date format string (DateFormat) already has the correct value 'DD-MM-YYYY'

manojkulkarni
Partner - Specialist II
Partner - Specialist II

you just use Date() function to convert into required format.

Date(42303.56960,'DD-MM-YYYY') it worked for me

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try like this

LOAD

*,

Date(Floor(MyDATE), 'DD-MM-YYYY') AS Date_Formatted

FROM Datasource;


Hope this helps you.


Regards,

jagan.

tamilarasu
Champion
Champion

Simply  try,

Date(Floor(42303.565960648),'DD-MM-YYYY')

Date(Floor(MyDATE),'DD-MM-YYYY') as MyDateNew

buzzy996
Master II
Master II

looking for thisdatefrmt.PNG,

ahmar811
Creator III
Creator III

Try this

Date(Floor(Trim(MyDATE)), 'DD/MM/YYYY') as NewMyDate

hope this help you

Thanks & Regards

Ahmar

Anonymous
Not applicable
Author

Hi Guys,

thanks for all suggestion. It solve my problem perfectly.

Once again, thanks in advance