Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Talk to Experts Tuesday, Live Q&A, September 22: Moving from QlikView to Qlik Sense. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor
Contributor

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
Highlighted
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.

Highlighted

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

thanks

regards

Marco

Highlighted
Creator III
Creator III

Hi Sai,

You can use like below .

Date(Date#(<YourDatefield>))

Regards 

Akshaya

Highlighted
Creator
Creator

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


Highlighted
Master
Master

Can you paste one sample record?

Highlighted
Creator
Creator

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 🙂

Highlighted
Partner
Partner

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

Highlighted
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!