INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Any way to round a custom integer or decimal field?  (Read 888 times)

badger

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 397
  • Change this by choosing profile
Any way to round a custom integer or decimal field?
« on: February 27, 2010, 12:00:13 pm »

I am importing DVD "length" (which is in seconds) from PVD into a custom field which i divide by 60 ([length]/60).  Is there any way to round the result to the integer... or something less than the 8 or 9 decimals it now reports?
Logged

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9139
Re: Any way to round a custom integer or decimal field?
« Reply #1 on: February 27, 2010, 12:05:10 pm »

try: formatnumber([Custom Field],0)

So, your custom library field contains the data, and you use the above expression in your views to display the data in the format specified.

-marko

badger

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 397
  • Change this by choosing profile
Re: Any way to round a custom integer or decimal field?
« Reply #2 on: February 27, 2010, 02:13:48 pm »

Thank you.  I ended up with ........ formatnumber(math([Length]/60),0) for display.
Logged
Pages: [1]   Go Up