Skip to main content
Announcements
Customer Spotlight: Discover what’s possible with embedded analytics Oct. 16 at 10:00 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Date ?

Hi...

I have date and time combined field in my SQL db. they have used Longtodate function extract the date in DB. how to get the exact date in QLikview??

Eg : My Date filed shows the value "1419310077901".

15 Replies
krishna20
Specialist II
Specialist II

Hi,

Change your date format like below

=Date((CLM_CR_DT),'DD/MM/YYYY hh:mm:ss')

satishkurra
Specialist II
Specialist II

For any kind of date problems it is recommended to use the below

Date(Date#(Date,'YYYYMMDD')) as Date,

Date# converts text to number and Date converts number to text.

Thanks

Satish

Anonymous
Not applicable
Author

Can you explain what exactly date and time is represented by value '1419310077901'?

Most likely you need the timestamp#() function, but I can't guess the format...

Anonymous
Not applicable
Author

Hi try like this


Date(Date#(DateField, 'YYYYMMDD'), 'M/D/YY')



Get the Dates Right

Hope this will help you


Not applicable
Author

even I am nt able to guess the format.when I extract the table from DB.it gives me the date in this format. and they are using LONGTODATE function inorder to extract the date.

Anonymous
Not applicable
Author

From what I read about longtodate - it is the number of milliseconds from the "beginning of time" (1970).  If this is the case, this should work:

=timestamp(addyears(timestamp(YourDateField/86400000),70))

Where 86400000 is the number of milliseconds in one day.

krishna20
Specialist II
Specialist II

Hi

Have you tried this

=Date((your_Date_Fild),'DD/MM/YYYY hh:mm:ss')

Not applicable
Author

hi... I gt the date as I required.

Can yu please explain wat we are doing here exactly.??

Regards,

Reena

Anonymous
Not applicable
Author

Nice Work Micheal