Overview
SAC Story calculations now supports additional date/time functions. TOTIME() converts a DateTime inout to a Time output. TODATE() converts a date string in a Date format. ISOWEEK returns the ISO year and week for a specified data. WEEK returns the week number for a specified date.
TOTIME converts a string to a time object, with the string and date format as inputs. In the given example, 20:39:45 is converted to 8:39:45 PM.
TODATE converts a string or a datetime to a time object. If the data is a datetime or timestamp, no format is needed. If the data is a string, such as 2014/09/2015, then a format is needed in the input.
ISOWEEK returns the ISO year and week for a date/string. An input of 01-01-2017 gives a return of 2016-W52.
WEEK returns the week as a number, from a given date. The date 2012-03-23 returns the week number 12.