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

Date issue in qlikview document

Hi ,

I have a document where i am using dates from different sources and all dates are with different formats. How do I make all dates into the same format.

Thanks in advance,
Ramdas Hegde

1 Solution

Accepted Solutions
PrashantSangle

Hi,

Use

Date(alt(dateFieldName,

dateFieldName1,

dateFieldName2

),'DD/MM/YYYY') as Newdate

Regards,

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

5 Replies
PrashantSangle

Hi,

Use

Date(alt(dateFieldName,

dateFieldName1,

dateFieldName2

),'DD/MM/YYYY') as Newdate

Regards,

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 🙂
MK_QSL
MVP
MVP

Check below script which will tell you how to convert different date format in a single date format...

============

Load

RowNo() as NO,

PRODUCT_DETAIL_CODE,

PURCHASE_DATE as Original_PURCHASE_DATE,

Date(Alt(

  Date#(PURCHASE_DATE,'DD-MMM-YY'),

  Date#(PURCHASE_DATE,'MMM YYYY'),

  Date#(PURCHASE_DATE,'YYYYMMDD'),

  Date#(PURCHASE_DATE,'D-MM-YY'),

  ),

'DD-MM-YYYY') as Modified_PURCHASE_DATE

Inline

[

  PURCHASE_DATE, PRODUCT_DETAIL_CODE

  14-Nov-07, Others

  Dec 2010, 10128738

  26-Feb-08, 11197529

  14-Dec-07, 11438953

  18-Nov-05, 11425786

  11-Sep-13, 11208766

  30-Aug-13, 11209023

  2-Sep-13, 11208856

  23-Oct-13, 11208959

  10-Sep-13, 11209074

  12-Feb-13, 11208907

  8-Nov-13, 11198348

  Nov 2010, 43005270

  9-Sep-13, 11170032

];

================

Hope this helps..

Not applicable
Author

Hi,

Since date have different format, You can use as below in edit script:

Year(date#(created_date,'MM/DD/YYYY')) as YEAR

Not applicable
Author

Hi

Not applicable
Author

Thank you all it helped me a lot....