How can I change a date field "10/12/2016" to display as 1016?

  • 0
  • 1
  • Question
  • Updated 3 years ago
  • Answered
Photo of nancy

nancy

  • 114 Points 100 badge 2x thumb

Posted 3 years ago

  • 0
  • 1
not tested, but try this

var MM = right("0"& month([date field]),2);

var YY = left(totext(year([date field])),2);

$MM & $YY



it should give you a format like 0316 for March 2016 dates.
Photo of nancy

nancy

  • 114 Points 100 badge 2x thumb
Thank you so very much for the quick reply! After testing, I received an error code that Var requires a declaration type. ? Any further advice?
Sorry,

var text MM = right("0"& month([date field]),2);

var text YY = left(totext(year([date field])),2);

$MM & $YY