Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
BARC’s The BI Survey 19 makes it official. BI users love Qlik. GET REPORT
Highlighted
akpofureenughwu
Contributor III

Convert Time Period to Time

Good day everyone,

I have a data set, that have a time period from 12:00am -1:00am and so on, I would love to convert that period to a specific time say 12:00am- 1:00 am to just 1:00am..

Attached is a sample data file. and I would love to replicate what I saw on the community some time ago on qliksense with the sample data. (see attached)

Regards

1 Solution

Accepted Solutions

Re: Convert Time Period to Time

May be like this

Table:

LOAD [Network Date],

    Time,

    Hour(Trim(SubField(Time, ' - ', 2))) as Hour,

    Time(Trim(SubField(Time, ' - ', 2))) as NewTime,

    Downtime,

    Uptime,

    Coverage,

    [Traffic Total (volume in KByte)],

    [Traffic Total (speed in kbit/s)],

    [Traffic In (volume in KByte)],

    [Traffic In (speed in kbit/s)],

    [Traffic Out (volume in KByte)],

    [Traffic Out (speed in kbit/s)],

    [Errors in (volume in #)],

    [Errors in (speed in #/s)],

    [Errors out (volume in #)],

    [Errors out (speed in #/s)],

    [Discards in (volume in #)],

    [Discards out (volume in #)],

    [Discards out (speed in #/s)]

FROM

[..\..\Downloads\Sample.xlsx]

(ooxml, embedded labels, table is Sheet1);


Capture.PNG

View solution in original post

2 Replies

Re: Convert Time Period to Time

May be like this

Table:

LOAD [Network Date],

    Time,

    Hour(Trim(SubField(Time, ' - ', 2))) as Hour,

    Time(Trim(SubField(Time, ' - ', 2))) as NewTime,

    Downtime,

    Uptime,

    Coverage,

    [Traffic Total (volume in KByte)],

    [Traffic Total (speed in kbit/s)],

    [Traffic In (volume in KByte)],

    [Traffic In (speed in kbit/s)],

    [Traffic Out (volume in KByte)],

    [Traffic Out (speed in kbit/s)],

    [Errors in (volume in #)],

    [Errors in (speed in #/s)],

    [Errors out (volume in #)],

    [Errors out (speed in #/s)],

    [Discards in (volume in #)],

    [Discards out (volume in #)],

    [Discards out (speed in #/s)]

FROM

[..\..\Downloads\Sample.xlsx]

(ooxml, embedded labels, table is Sheet1);


Capture.PNG

View solution in original post

Partner
Partner

Re: Convert Time Period to Time

Hi try this expression

Time(Subfield(Time,'-',2) )as Time