Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Remove Am and pm from Time Interval

I have created a field by using

INTERVAL(TIMESTAMP(ReloadTime(),'hhh:mm:ss')- INTERVAL(TIMESTAMP(EvDate),'hhh:mm:ss'))  AS Trial,

And I believe the data is correct However, I would like to remove the AM and PM Fields, , I have attached a ss . Thank You in advance .

Tags (5)
1 Solution

Accepted Solutions
Highlighted
MVP
MVP

Re: Remove Am and pm from Time Interval

=interval(reloadtime() - timestamp(today()-1), 'hh:mm:ss')

=interval(reloadtime() - timestamp(EvDate), 'hh:mm:ss')

6 Replies
Not applicable

Re: Remove Am and pm from Time Interval

Perhaps a string function like subfield would work:

=subset(Trial,' ', 1)

Matt

Employee
Employee

Re: Remove Am and pm from Time Interval

Perhaps this might help (with formatting) of the timestamp.

Time format including AM/PM | Qlik Community

Not applicable

Re: Re: Remove Am and pm from Time Interval

I ended up using Subfield at the script level

SubField(INTERVAL(TIMESTAMP(ReloadTime(),'hhh:mm:ss')- INTERVAL(TIMESTAMP(EvDate),'hhh:mm:ss')),' ',1))

Which is giving me

TimeDifference2.gifI am getting what I need but do you think it is the wrong way?

  Will I have problems doing aggregations on this, it seems to be working as of now

Highlighted
MVP
MVP

Re: Remove Am and pm from Time Interval

=interval(reloadtime() - timestamp(today()-1), 'hh:mm:ss')

=interval(reloadtime() - timestamp(EvDate), 'hh:mm:ss')

Partner
Partner

Re: Remove Am and pm from Time Interval

Hi,

Enclose your formula with Time(Your_Formula, 'hh:mm:ss'). This way your time data will be displayed just in hours, minutes and seconds disregarding the AM/PM,

regards

Not applicable

Re: Remove Am and pm from Time Interval

That Worked perfectly Thank You so much!