Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
ashis
Creator III
Creator III

Not able to associate date with all the its time stamps

Hi,

In my data source I have date column as 7/24/2017  4:35:43 PM, which has many entries for a single date  since it has time stamp.

The data is a log file.

I want to segregate date field as 7/22/2017 and want to associate this with all the instance of the same date irrespective of different time stamp.

24 Jul 2017 17:09:07

24 Jul 2017 17:08:47

24 Jul 2017 16:35:43

24 Jul 2017 16:35:23

24 Jul 2017 16:34:44

24 Jul 2017 16:33:57

24 Jul 2017 16:28:02

24 Jul 2017 16:27:28

24 Jul 2017 16:26:53

24 Jul 2017 16:26:19

24 Jul 2017 16:25:45

24 Jul 2017 16:25:20

24 Jul 2017 16:24:19

24 Jul 2017 15:38:40

24 Jul 2017 14:57:47

I tried this

date(date(date,'MM/DD/YYYY hh:mm:ss'),'MM/DD/YYYY') AS [Date],

Problem I am facing in the listbox when I select date as field I see many instances of the same date . I want only distinct date in list box, that should be associate with all the date and its time stamp.

Please help how to get it done.

Regards,

Ashis

4 Replies
m_woolf
Master II
Master II

use floor(date)

PrashantSangle

create in script.

date(datefield,'MM/DD/YYYY') as newField

and use new field in front end

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 🙂
Colin-Albert

Datetime fields are held as a floating point value, date fields are integers.

To convert your datetime field to an integer use this in your script

    floor(date) as Date

These blogs show many of the common issues with date fields

Why don’t my dates work?

Get the Dates Right

ashis
Creator III
Creator III
Author

Thank you all for your reply.

I tried date field as

date#(date(datefield,'MM/DD/YYYY'),'MM/DD/YYYY') AS [Date] and it is solved.

Technically it should be

date(date#(date,'MM/DD/YYYY'),'MM/DD/YYYY') AS [Date] but this one is giving me numeric value not date .

Is there something blunder i am doing here?