INTERACT FORUM

Please login or register.

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

Author Topic: Format Date not working properly? [Solved]  (Read 1147 times)

BartMan01

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1513
Format Date not working properly? [Solved]
« on: April 23, 2012, 01:29:21 pm »

Trying to use FormatDate in a rename process.

Current usage is FormatDate([Date],yyyy-MM-dd).  Used to take the [Date] field and format, not working now.

Value in Date field =  04/01/2012.
FormatDate([Date]) = 4_1_2012
FormatDate([Date],yyyy-MM-dd) = 1900-01-03

This is with version 17.0.122

I saw another post mentioning changes to these functions, but no specifics on how FormatDate changed.
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42372
  • Shoes gone again!
Re: Format Date not working properly?
« Reply #1 on: April 23, 2012, 01:32:40 pm »

You need to work on the raw data, not the date formatted for display.

In other words, use this (notice the 0 after the Date field):
FormatDate([Date, 0], yyyy-MM-dd)

Logged
Matt Ashland, JRiver Media Center

BartMan01

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1513
Re: Format Date not working properly?
« Reply #2 on: April 23, 2012, 01:41:37 pm »

You need to work on the raw data, not the date formatted for display.

In other words, use this (notice the 0 after the Date field):
FormatDate([Date, 0], yyyy-MM-dd)



Thanks. [Date, 0] instead of [Date] did the trick.
Logged
Pages: [1]   Go Up