INTERACT FORUM

Please login or register.

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

Author Topic: Convertdate  (Read 211 times)

Wilhelm Kabus

  • Junior Woodchuck
  • **
  • Posts: 71
Convertdate
« on: February 17, 2023, 11:07:18 am »

Hi! In this version my expression column formula no longer works. Displaying "Expression Error":

s-math(
FormatNumber( Now(),0)
-
FormatNumber( ConvertDate([played],0)))

Used to give me # of days since last played :-)
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 41958
  • Shoes gone again!
Re: Convertdate
« Reply #1 on: February 17, 2023, 11:38:38 am »

Hi! In this version my expression column formula no longer works. Displaying "Expression Error":

s-math(
FormatNumber( Now(),0)
-
FormatNumber( ConvertDate([played],0)))

Used to give me # of days since last played :-)

I think your date is already the internal format so doing ConvertDate won't work.

Maybe something like this:
CompareDates([Last Played, 0], Now(), d)
Logged
Matt Ashland, JRiver Media Center

Wilhelm Kabus

  • Junior Woodchuck
  • **
  • Posts: 71
Re: Convertdate
« Reply #2 on: February 17, 2023, 12:46:02 pm »

I think your date is already the internal format so doing ConvertDate won't work.

Maybe something like this:
CompareDates([Last Played, 0], Now(), d)

But it worked fine in many previous versions. You don't want to support my formula anymore, Matt?
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 41958
  • Shoes gone again!
Re: Convertdate
« Reply #3 on: February 17, 2023, 12:54:35 pm »

But it worked fine in many previous versions. You don't want to support my formula anymore, Matt?

It's just because there are a couple parameters to the ConverDate function but it only takes one.  I can switch to just ignoring the extra parameters in the next build.
Logged
Matt Ashland, JRiver Media Center

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2390
Re: Convertdate
« Reply #4 on: February 17, 2023, 01:58:20 pm »

Maybe you meant ConvertDate([played,0])) ?

ConvertDate([played],0)) is wrong and was always wrong - it just worked because the second argument (0) was ignored, which is no longer the case.
Logged

Wilhelm Kabus

  • Junior Woodchuck
  • **
  • Posts: 71
Re: Convertdate
« Reply #5 on: February 17, 2023, 05:34:35 pm »

No need, Matt... I removed it. Works now...
Logged
Pages: [1]   Go Up