AnsweredAssumed Answered

Formatting Date in Processbook

Question asked by taterhead247 on Feb 9, 2017
Latest reply on Feb 9, 2017 by jru

I have an attribute in AF where the value is a datetime  In this case, it's 1/1/2017 12:00:00 AM.  I'd like to report this date in Processbook, but that's very long.  I just want it to say "Jan 17".  Is there a way to do this?  I can't find anything in processbook for formatting dates (just numbers).  One of my coworkers found that you can use the Format function in String Builder, but that requires a child attribute, which I think is messy.

So, this being a tag produced using Analysis, I though I'd build the Format function directly into the analysis.  Much to my chagrin, the Format function in String Builder is different than the Format function in Analysis.  The one in Analysis requires a modified use of sprintf, a function from c language.  In c, it requires multiple inputs to format a date (example: $isodate = sprintf("%04d-%02d-%02d", $year, $month, $day);).  Analysis only allows you 1 input (Format(x, format [,numType ])).



Does anyone know how to format a time in Processbook?  I'd prefer to just do it directly in Processbook, but if that's not possible I can do it in AF, as long as it's clean.