INTERACT FORUM

Please login or register.

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

Author Topic: math with now() not working?  (Read 395 times)

gappie

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4580
math with now() not working?
« on: November 19, 2023, 07:30:09 am »

hi  8)
i am wondering if something changed, because it seems like the math function does not work anymore with now(). i have a few fields that use this.

but doing
Code: [Select]
math(now()-1)gives a 0

used to work

gab
 :)
Logged

lepa

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2033
Re: math with now() not working?
« Reply #1 on: November 19, 2023, 08:29:31 am »

If your system has comma as decimal point you probably need to wrap now() inside decimal() function:
Math(Decimal(Now()) - 1)
Logged

gappie

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4580
Re: math with now() not working?
« Reply #2 on: November 20, 2023, 02:53:32 am »

If your system has comma as decimal point you probably need to wrap now() inside decimal() function:
Math(Decimal(Now()) - 1)
thank you, that worked. i guess i changed something on my system, since i never had to use that.
Logged
Pages: [1]   Go Up