extracting the day of the week can be achieved by using the appropriate date format, typically:
- “EEE” – this will return a 3 letter weekday name (‘Mon’, ‘Tue’, etc.)
- “EEEE” – this will return the full weekday name (‘Monday’, ‘Tuesday’, etc.)
So basically, the only CTL function that you need is the date2str() function with the desired format definition that would convert a date in the date format into a string, for instance:
Code: Select all
$out.0.dayOfWeek = date2str(2018-07-13, "EEEE");
Such transformation will output “Friday” as a string value.