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 and number combination in date filed,how to convert to date format ?

I have combination of date and number in date field ,how to convert into complete date format ,please help.

8 Replies
vishsaggi
Champion III
Champion III

What is the current format you are getting in your date field?

you can use Date() and Date#() functions to convert accordingly.

MarcoWedel

please post some values of your date field and the load statement(s) that created them.

thanks

regards

Marco

adityaakshaya
Creator III
Creator III

Hi Sai,

You can use like below .

Date(Date#(<YourDatefield>))

Regards 

Akshaya

Anonymous
Not applicable
Author

Hi Sai,

I did it as below:

Date(Date#(<CreateDate>))


My data as below:

 

CreateDateDeliveryDate
3-Apr-1720-Apr-17
5-Apr-1718-Apr-17
5-Apr-176-Apr-17
4-Apr-1715-Apr-17
5-Apr-1710-Apr-17
5-Apr-1722-Jun-17
5-Apr-17

8-Apr-17


Both CreateDate and DeliveryDate is in Date-time format.


Thanks


shiveshsingh
Master
Master

Can you paste one sample record?

Anonymous
Not applicable
Author

I have already provide my data set....

use these formula,forget the previous one:

= (DATE#(Today(),'MM/D/YYYY'))

or

= (DATE#(CreateDate,'MM/D/YYYY'))

It works fine on my Qvd file 🙂

mhappiee
Partner - Contributor III
Partner - Contributor III

Hi sai,

Hope your case like the following

if the date is like the following and the field name is orderdate

05192018101236

first make ur Qlik understand that its a date and time so  set the format to make Qlik understand that

Date#(orderdate,'MMDDYYYYHHMMSS') which will be read by Qlik as below

Date#(05192018101236,'MMDDYYYYHHMMSS')

now convert that to original /general format for that

Date(Date#(05192018101236,'MMDDYYYYHHMMSS'),'MM/DD/YYYY HH:MM:SS')

then the result should be  05/19/2018 10:12:36

Hope this helps

Anand

shiveshsingh
Master
Master

I haven't asked to you for data set.

I asked SAI. And yes one more thing, how are you using Date# function without knowing the input format in the question? May be his format is different!