Skip to main content
Question

Converting Month & Year (Text) to Date Field

  • February 15, 2019
  • 0 replies
  • 130 views

Hi,

I have a text field [Invoice Month] (reads "January 2019", "February 2019", etc) that I need to reformat into a date format. (January 2019 to 01/01/2019). What is the best way to do this?

Thanks! 
This topic has been closed for replies.

This should work as a formula date field

var number YYYY = ToNumber(Trim(Right([Invoice Date], " ")));

var text MonthName = Trim(Left([Invoice Date], " "));

var number MM = Case($MonthName,
"January", 1,
"February", 2,
"etc", 99,
"December", 12);

Date($YYYY,$MM,1)





  • Author
  • Registered
  • February 15, 2019
Thank you! This worked perfectly!