Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

convert real to seconds

(0) ShareShare
ReportReport
Posted on by 2,030

greeting everyone

how can i convert real to seconds

i'm get value from this table

HRMAbsenceTrans.hours

pastedimage1601453383234v1.png

pastedimage1601453422053v2.png

i need to convert that to seconds

  • Gunjan Bhattachayya Profile Picture
    35,421 on at
    RE: convert real to seconds

    Yes. It's converting to a real value anyway. So, you wouldn't face any issues

  • mohammed.mqi Profile Picture
    2,030 on at
    RE: convert real to seconds

    but that fields include hours

    and minutes consider as decimal is that ok ?  

  • Suggested answer
    Martin Dráb Profile Picture
    232,068 Most Valuable Professional on at
    RE: convert real to seconds

    And you can utilize TimeConstants macro to avoid the magic constant:

    #TimeConstants
    ...
    hrmAbsenceTrans.Hours * #SecondsPerHour;

  • Suggested answer
    mhdshb1 Profile Picture
    1,250 on at
    RE: convert real to seconds

    Hi Mohammed,

    As mentioned you can multiply with 3600 to get the value in seconds

    HRMAbsenceTrans hrmAbsenceTrans;
    
    select firstonly1 hrmAbsenceTrans;
    
    info(strFmt('%1',hrmAbsenceTrans.hours* 3600));

    Regards,

    M

  • Verified answer
    Gunjan Bhattachayya Profile Picture
    35,421 on at
    RE: convert real to seconds

    Hi mohammed,

    Just multiply by 3600 to get the seconds for an hour.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 293,289 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,068 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Product updates

Dynamics 365 release plans