Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
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 .

1 Solution

Accepted Solutions
maxgro
MVP
MVP

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

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

View solution in original post

6 Replies
Not applicable
Author

Perhaps a string function like subfield would work:

=subset(Trial,' ', 1)

Matt

Greg_Williams
Employee
Employee

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

Time format including AM/PM | Qlik Community

Not applicable
Author

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

maxgro
MVP
MVP

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

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

jaimeaguilar
Partner - Specialist II
Partner - Specialist II

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
Author

That Worked perfectly Thank You so much!