Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
employe4_2
Contributor III
Contributor III

Converting Date format

HI,

 

I have a full date with DD/MM/YYYY hh:mm format. But i'd like to know how to split it to get DD/MM/YYYY format. Vizlib calendar only accept DD/MM/YYYY format

 

cdt

2 Solutions

Accepted Solutions
PrashantSangle

Use date() or string function to achieve it

1: Date(dateField,'DD/MM/YYYY') >>>>>>> If datefield is stored as date
2: Date(Date#(dateField,'DD/MM/YYYY hh:mm'),'DD/MM/YYYY') >> If datefield is stored as string
3: Date(Left(trim(dateField),10),'DD/MM/YYYY')

Regards,
Prashant Sangle
Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂

View solution in original post

R_Kaymakchiev
Luminary Alumni
Luminary Alumni

Hi,

you can easily just create a new data field from the existing one:

ex.

New_Data_field_name = Date( Old_data_field_name, 'DD/MM/YYYY' )

Old_data_field_name  would correspond to the field with the full date with DD/MM/YYYY hh:mm format

 

You can as well create this field in the Loading script:

Date( "Old_data_field_name", 'DD/MM/YYYY' ) as  New_Data_field_name

 

View solution in original post

2 Replies
PrashantSangle

Use date() or string function to achieve it

1: Date(dateField,'DD/MM/YYYY') >>>>>>> If datefield is stored as date
2: Date(Date#(dateField,'DD/MM/YYYY hh:mm'),'DD/MM/YYYY') >> If datefield is stored as string
3: Date(Left(trim(dateField),10),'DD/MM/YYYY')

Regards,
Prashant Sangle
Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
R_Kaymakchiev
Luminary Alumni
Luminary Alumni

Hi,

you can easily just create a new data field from the existing one:

ex.

New_Data_field_name = Date( Old_data_field_name, 'DD/MM/YYYY' )

Old_data_field_name  would correspond to the field with the full date with DD/MM/YYYY hh:mm format

 

You can as well create this field in the Loading script:

Date( "Old_data_field_name", 'DD/MM/YYYY' ) as  New_Data_field_name