AugForums.com

An Acumatica User Group

  • Free
    • Start Here
    • Rolodex
    • Podcast
    • Blog
    • Forums
  • Paid
    • AugSQL
    • GI Course
    • GI Library
    • Consulting
  • Register
Acumatica Forums

By using this website, you agree to our Terms of Use (click here)

Forums
AUG Forums
Acumatica Generic I...
GI - convert time f...
 
Notifications
Clear all

Questions [Solved] GI - convert time field so dividing $/time calculation works

 
Acumatica Generic Inquiries & Pivot Tables
Last Post by Alisann Crough 7 years ago
8 Posts
3 Users
1 Reactions
3,345 Views
RSS
Alisann Crough
Posts: 28
 Alisann Crough
Topic starter
January 31, 2019 1:18 pm
(@alisann-crough)
Eminent Member
Joined: 7 years ago

I can bring back a cost and I can bring back a time (ActualDurationTotal) but I need to know how to turn ActualDurationTotal into a single time unit (preferably hours not minutes).  e.g. 3hrs 15min = 3.25 hours

Looking for how to do this or a recommendation of any reference material that covers this topic.

Thanks


7 Replies
Royce Lithgo
Posts: 557
 Royce Lithgo
January 31, 2019 6:05 pm
(@roycelithgo)
Honorable Member
Joined: 6 years ago

off the top of my head:

=Hour(ActualDurationTotal) + Minute(ActualDurationTotal) / 60

For simplicity I am assuming seconds aren't relevant. 


Reply
Alisann Crough
Posts: 28
 Alisann Crough
Topic starter
February 1, 2019 11:07 am
(@alisann-crough)
Eminent Member
Joined: 7 years ago

Thank you! Is there any documentation anywhere that explains the syntax?  I understand the concept but can't get it to work. In the results grid I have tried all these variations with the following results:

Object                                                 Data Field

FSAppointmentFromSOLine     ActualDurationTotal          returns       3hrs 30min

 

All of the following return        “Error: A field with the name ActualDurationTotal cannot be found.”

FSAppointmentFromSOLine      =Hour(ActualDurationTotal)

FSAppointmentFromSOLine      =Hour([FSAppointmentFromSOLine.ActualDurationTotal])   

FSAppointmentFromSOLine      =Hour(FSAppointmentFromSOLine.ActualDurationTotal)


Reply
Royce Lithgo
Posts: 557
 Royce Lithgo
February 3, 2019 4:47 pm
(@roycelithgo)
Honorable Member
Joined: 6 years ago

Sorry i thought you knew GI well enough to understand my example - you need to put the data object in square brackets, like what you did for your 2nd example. I don't know which DAC you are using as I'm not familiar with FSAppointmentFromSOLine - seeing as you already said you could get the time, i assume you know the full name of the object. 


Reply
Alisann Crough
Posts: 28
 Alisann Crough
Topic starter
February 3, 2019 5:06 pm
(@alisann-crough)
Eminent Member
Joined: 7 years ago

FSAppointmentFromSOLine is an alias for FSAppointment and it isn't relevant - sorry!

So I've since found the formula editor which is really helpful and I can get the formula and their syntax. Also I have been able to at least get a result but it always brings back 0 even if the ActualDurationTime is 4hr 2 min

=Hour(Now())  returns  16

ActualDurationTotal (for my test line)   returns  4 h 02 m

=Hour ( [FSAppointment.ActualDurationTotal] )    returns   0

=Minute ( [FSAppointment.ActualDurationTotal] )    returns   0

What's wrong or missing?

 


Reply
Royce Lithgo
Posts: 557
 Royce Lithgo
February 4, 2019 8:05 pm
(@roycelithgo)
Honorable Member
Joined: 6 years ago

Because the field is not a date, the Hour(), Minute() formulas cannot be used:

I assume it's designed to represent time spans in english, as per your example. I think it would be quite difficult to convert this to a decimal number. You probably need to calculate it's value manually from some other fields in the DAC.

eg. =Hour([FSAppointment.ActualDateTimeEnd] - [FSAppointment.ActualDateTimeBegin])

 


Reply
Shawn P Slavin
 Shawn P Slavin
(@shawn-p-slavin)
Joined: 6 years ago

Estimable Member
Posts: 196
February 5, 2019 10:37 am
Reply toRoyce LithgoRoyce Lithgo

Royce, have you tried formatting the output as an integer value rather than it's default timespan? I'm thinking of Tim Rodman's example with dates by using schema reference to a different date field so you can get the date and time rather than just date. I can't think of an integer data field off the top of my head but if you can, it's worth a shot. If it does work, you can then determine if it returns minutes or another value and then adjust from there. Just a thought.


Reply
Alisann Crough
Posts: 28
 Alisann Crough
Topic starter
February 5, 2019 1:52 pm
(@alisann-crough)
Eminent Member
Joined: 7 years ago

Thanks for all the info!   I have found something that works with the field ActualTimeDuration. 

=CDec( [FSAppointment.ActualTimeDuration] ) 

 

 


Reply
Tim Rodman reacted
Forum Jump:
  Previous Topic
Next Topic  
Forum Information
Recent Posts
Unread Posts
Tags
  • 12 Forums
  • 2,527 Topics
  • 10.9 K Posts
  • 29 Online
  • 2,412 Members
Our newest member: Peter Paasch
Latest Post: Can't export GI's to excel that contain the FATrans DAC after upgrade to 2025 R1 in less than 25 min
Forum Icons: Forum contains no unread posts Forum contains unread posts
Topic Icons: Not Replied Replied Active Hot Sticky Unapproved Solved Private Closed

Online Members

  • amassey
Acumatica Forums

Terms of Use & Disclaimers :: Privacy Policy

Copyright © 2026 · AUG Forums, LLC. All rights reserved. This website is not owned, affiliated with, or endorsed by Acumatica, Inc.

‹›×

    ‹›×