Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

How to deal with Datetime , means how to retrieve dates times and days from Time series data. Please suggest me.

How to deal with Datetime , means how to retrieve dates times and days from Time series data. Please suggest me.

12 Replies

Re: How to deal with Datetime , means how to retrieve dates times and days from Time series data. Please suggest me.

You can use Date() function to retrieve date and Time() function to retrieve time. If that's not what you are looking for, would you be able to elaborate a little?

darkhorse
Valued Contributor

Re: How to deal with Datetime , means how to retrieve dates times and days from Time series data. Please suggest me.

Hello,

Use Help. For example:

http://help.qlik.com/sense/2.1/en-US/online/#../Subsystems/Hub/Content/Scripting/FormattingFunctions...

I suggest you use QlikView Help for functions (F1), if you have it installed.

Date(Floor(DATE)) --> You get the date.

etc.

BR

Serhan

brunobertels
Valued Contributor

Re: How to deal with Datetime , means how to retrieve dates times and days from Time series data. Please suggest me.

Hi

I think you've got something like that as date field :

'DD MMMM YYYY hh:mm' called "date" in your data

So

To get the hour :

Hour(Timestamp("date_ID",'DD MMMM YYYY hh:mm')) as Hour_ID,

to get only the date :

Date(Floor(Date("date_ID",'DD MMMM YYYY hh:mm')),'DD/MM/YYYY')) as "date_ID",

week

Week(Floor(Date("date_ID",'DD MMMM YYYY hh:mm')),'DD/MM/YYYY')) as "week_ID",

month :

Month(Floor(Date("date_ID",'DD MMMM YYYY hh:mm')),'DD/MM/YYYY')) as "month_ID",

Bruno

puttemans
Valued Contributor

Re: How to deal with Datetime , means how to retrieve dates times and days from Time series data. Please suggest me.

Please be a bit more specific in your request. If possible, with a sample of the data you have, and the detail you'd like to retrieve. This way, we're only guessing.

KR,

Johan

Not applicable

Re: How to deal with Datetime , means how to retrieve dates times and days from Time series data. Please suggest me.

DateTimePredicted_CallVolume_June2015RoundedResourceAgentNeeded_EachHour
6/1/2015 0:0021varun
6/1/2015 1:0011varun
6/1/2015 2:0021varun
6/1/2015 3:0011varun

I have a dataset with these sample columns . I want to add DateTime as X-axis and all columns as Y-axis.

How to add AgentNeeded_EachHour column as points on the same graph.

As well as I want to add filter for hours months and days.

Can it will be possible.

Thanks Friends .

Please suggest me.

reddys310
Honored Contributor II

Re: How to deal with Datetime , means how to retrieve dates times and days from Time series data. Please suggest me.

Hi Bibhuti,

With the sample data you have given above, I have made a sample for you.

Used a bar chart to display the data and included all the other filter you requested for.

Capture.PNG

Capture1.PNG

Please find the qvf attached

Hope this answers your questions!

- Sangram

brunobertels
Valued Contributor

Re: How to deal with Datetime , means how to retrieve dates times and days from Time series data. Please suggest me.

Hi

To get hour and date

add this in your script

date(floor(Timestamp(DateTime,'DD MMMM YYYY hh:mm'))) as "Date",

Hour(Timestamp(DateTime,'DD MMMM YYYY hh:mm')) as "Hour",

you can add this also :

week(date(floor(Timestamp(DateTime,'DD MMMM YYYY hh:mm')))) as "Week",

Month(floor(Timestamp(DateTime,'DD MMMM YYYY hh:mm')))) as "Month",

this will add you 2 dimensions one for date , one for hours

See attached app as exemple with bar graph as call volume and line as needed agent to handled your call

Regards

Bruno

Not applicable

Re: How to deal with Datetime , means how to retrieve dates times and days from Time series data. Please suggest me.

Thanks Bro,

I will apply this script,

Thanks again bro...

Not applicable

Re: How to deal with Datetime , means how to retrieve dates times and days from Time series data. Please suggest me.

Thanks Mr Bertels,

This helps me alot.

Thanks & Regards,

Bibhuti

Community Browser