Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor
Contributor

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
Highlighted

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

Highlighted
Highlighted

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

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 ?

 

 

 

Highlighted

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

Highlighted
Highlighted
Highlighted
Contributor
Contributor

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

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

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

 

Highlighted

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

Highlighted
Contributor
Contributor

Hi..

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

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