Magic ETL

Magic ETL

Convert time to decimal

Member
edited October 2024 in Magic ETL

Good Afternoon,

I want to convert my wrapup voice time to a decimal because I want to be able to use that number with interactions to be able to get my Calls Answered, is there a way to do that?

Welcome!

It looks like you're new here. Members get access to exclusive content, events, rewards, and more. Sign in or register to get started.
Sign In

Best Answers

  • Contributor
    Answer ✓

    Hi @JBerr,

    Certainly! You can convert it using Magic ETL using various methods. Here's one example to convert recorded time into seconds with Formula tile:

    SUBSTRING(Time, 1, 2)*3600 + SUBSTRING(Time, 4, 2)*60 + SUBSTRING(Time, 7, 2)

    This is the result:

    image.png

    If you found this post helpful, please use 💡/💖/👍/😊 below! If it solved your problem, don't forget to accept the answer.

  • Coach
    Answer ✓

    there is actually a TIME_TO_SEC() function that will convert to seconds, in order for it to be a decimal you have to determine if you want your value to be a fraction of a minute, an hour, or a day

  • Contributor
    Answer ✓

    Hello @ggenovese,

    I wasn't aware that TIME_TO_SEC() functions with text format. I thought it only accepted a Timestamp format. I've verified that it does work. Thanks for the clarification. Yes, this is a much cleaner and easier solution!

    If you found this post helpful, please use 💡/💖/👍/😊 below! If it solved your problem, don't forget to accept the answer.

Answers

  • Contributor
    Answer ✓

    Hi @JBerr,

    Certainly! You can convert it using Magic ETL using various methods. Here's one example to convert recorded time into seconds with Formula tile:

    SUBSTRING(Time, 1, 2)*3600 + SUBSTRING(Time, 4, 2)*60 + SUBSTRING(Time, 7, 2)

    This is the result:

    image.png

    If you found this post helpful, please use 💡/💖/👍/😊 below! If it solved your problem, don't forget to accept the answer.

  • Coach
    Answer ✓

    there is actually a TIME_TO_SEC() function that will convert to seconds, in order for it to be a decimal you have to determine if you want your value to be a fraction of a minute, an hour, or a day

  • Contributor
    Answer ✓

    Hello @ggenovese,

    I wasn't aware that TIME_TO_SEC() functions with text format. I thought it only accepted a Timestamp format. I've verified that it does work. Thanks for the clarification. Yes, this is a much cleaner and easier solution!

    If you found this post helpful, please use 💡/💖/👍/😊 below! If it solved your problem, don't forget to accept the answer.

Welcome!

It looks like you're new here. Members get access to exclusive content, events, rewards, and more. Sign in or register to get started.
Sign In