How would one go about casting Period field to Dat...
# general
s
How would one go about casting Period field to Date? I was using TO_DATE({postingperiod}, "MMM YYYY") but this returns an error, is this syntax not correct?
a
Are you trying to get it in date format to use in a formula, or you want to display the posting period itself in a specific format (MMM YYYY)? To turn it into a date, you can use TO_DATE(CONCAT('01 ',{postingperiod}),'dd/mm/yy'), or otherwise just use the {accountingperiod.startdate} field. To reformat in the search results, try 'MON YYYY'. I.e. the formula will be TO_CHAR(TO_DATE(CONCAT('01 ',{postingperiod}),'dd/mm/yy'),'MON YYYY') or TO_CHAR({accountingperiod.startdate},'MON YYYY')