Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to convert Date&Time to Date

Hi,

 

Date & TimeStatus
Nov 08 2018 11:59:44Not Hungry
Nov 08 2018 11:59:44Not Hungry
Nov 08 2018 11:59:44Not Hungry
Nov 09 2018 11:59:44Not Hungry
Nov 09 2018 11:59:44Not Hungry
Nov 08 2018 11:59:44Not Hungry
Nov 10 2018 11:59:44Not Hungry
Nov 10 2018 11:59:44Not Hungry
Nov 11 2018 11:59:44Not Hungry

 

1. How to convert Date & time above to Date ?

2. How to count the status ? and group by date ? 

3 Solutions

Accepted Solutions
sunny_talwar

May be use this instead for Date

Date(Floor(TimeStamp#([Date&Time],'MMM DD YYYY hh:mm:ss'))) as myDate,

For second question, try this

Dimension

myDate

Expression

Count(Status)

or

Count(DISTINCT Status)

View solution in original post

MarcoWedel

Your Date() function only formats your timestamps as Dates but keeps the underlying distinct timestamp values.
Did you try Sunny's Date(Floor()) combination or the DayName() function?

View solution in original post

8 Replies
Anonymous
Not applicable
Author

i am successful with question no 1 and i use Date(TimeStamp#([Date&Time],'MMM DD YYYY hh:mm:ss')) as myDate,

But still unable to do it for no 2 ?

 

 

 

sunny_talwar

May be use this instead for Date

Date(Floor(TimeStamp#([Date&Time],'MMM DD YYYY hh:mm:ss'))) as myDate,

For second question, try this

Dimension

myDate

Expression

Count(Status)

or

Count(DISTINCT Status)
Anonymous
Not applicable
Author

Hi,
I put the dimension as myDate and the expression as suggested.. tried both... it still didn't group the status under same date..
Anonymous
Not applicable
Author

Attached is the screenshot .. the status is not group by date.

I want to count total number under same date in the chart.... 

 

MarcoWedel

Your Date() function only formats your timestamps as Dates but keeps the underlying distinct timestamp values.
Did you try Sunny's Date(Floor()) combination or the DayName() function?
Anonymous
Not applicable
Author

Hi..

Thanks.. it is working now after i put as suggested.

Date(Floor((TimeStamp#([Date&Time],'MMM DD YYYY hh:mm:ss')))) as myDate,