INTERACT FORUM

Please login or register.

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

Author Topic: FormatDate function error  (Read 521 times)

dhiggins

  • Regular Member
  • World Citizen
  • ***
  • Posts: 126
FormatDate function error
« on: May 24, 2018, 08:13:39 am »

I'm having an issue with the FormatDate function.

I've attached a screenshot showing the issue.

Basically, I use formatDate([Date], %m) and it's always coming back "01"

On the other hand, if I use [Month], it resolves to the correct Month name.

I've tried "%m", "%M", "MM", "mm" etc, nothing appears to work to actually return the month number as "xx"

Any ideas?

This is MC 24.0.7 64bit

Logged

dhiggins

  • Regular Member
  • World Citizen
  • ***
  • Posts: 126
Re: FormatDate function error
« Reply #1 on: May 24, 2018, 08:19:15 am »

Well, may have solved my own issue, or at least worked around it.

If I use FormatDate(MM) it seems to work correctly.

Maybe just a problem with specifying the date to use?
Logged

ferday

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1732
Re: FormatDate function error
« Reply #2 on: May 24, 2018, 08:21:41 am »

Try [date,0] in the original function
Logged

Hendrik

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10933
Re: FormatDate function error
« Reply #3 on: May 24, 2018, 08:22:00 am »

You need to use [Date,0] to pass the raw unformated date value to the FormatDate function, ie. FormatDate([Date,0], %m) should work
Logged
~ nevcairiel
~ Author of LAV Filters
Pages: [1]   Go Up