Call Journaling Unix time in seconds rather then millis

Status
Not open for further replies.

LeighH

Gold Partner
Advanced Certified
Joined
Feb 9, 2022
Messages
7
Reaction score
2
Hi All,

Is there a way to output CallStartTimeLocal to Unix time in seconds rather then using CallStartTimeLocalMillis in milliseconds?

The PGSQL database I'm working with has an integer Data type but contains existing data from the previous phone system. Its not possible for me to change to "bigint" without having to re-create views and mess with existing data which I'd rather not do at this stage.

Thanks
 
Have you tried this expression?
[[CallStartTimeLocalMillis]*1000]
 
  • Like
Reactions: Evolute IT
Unfortunately that returns 1678920934930*1000]

Edit: Would it make any difference if I'm current testing on a mysql database?
 
Last edited:
I found a real messy way of achieving what I want.

UNIX_TIMESTAMP(now())-'[[[DurationTimespan].get_TotalSeconds()].ToString("F0")]'
Grabs the current time since epoch in seconds when the call was journaled and minuses the duration of the call in seconds to find the start time.

Can also be achieved using substring
 
Last edited:
  • Like
Reactions: edossantos
Status
Not open for further replies.

Forum statistics

Threads
112,322
Messages
591,887
Members
165,470
Latest member
Robert Lee