Hi Timothy Woodfield ,
In addition have a look at the expression below:
var dt = Date(2020, 0, 31);
Console("date: " + dt);
var m = Month(dt);
Console("month: " + m);
var format = "MM/DD/Y";
var txt = Text(dt, format);
Console("Formated date: " + txt);
return "OK";
This will write the following to the console:
date: 2020-01-31T00:00:00-05:00
month: 0
Formated date: 01/31/2020
Be aware that when you use a Date function and need to specify the value for the month if will always be a value from 0 to 11. When you extract the month value from a date it will always be a value from 0 to 11. However, when you format a date it will return the month as a value from 1 to 12 as shown in the example.