Skip to main content
Mr5strings
Inspiring
March 7, 2012
Answered

Formating cpInfo date...

  • March 7, 2012
  • 1 reply
  • 3598 views

Hello all,

I have a certificate that I need to put a date on formatted with the "MONTH" in January, February, March format...is there a way to do this? It seems that CP will only spit out NUMBERS...i.e. 03/08/2012...this isn't the desired format for my project...

I'm hoping (even if can be done) that I don't have to use Advanced Actions (i.e. IF cpInfoCurrentMonth IS EQUAL TO "1" ASSIGN January...for all 12 possibilities)...and by using that approach would mean I would have to use all three variables (cpInfoCurrentMonth, cpInfoCurrentDay and cpInfoCurrentYear) as separate text boxes to create the DATE format I want...

...I probably just answered my own question but you never know

Thanks.

This topic has been closed for replies.
Correct answer Jim Leichliter

You can either use Advanced Actions, but I prefer JavaScript for things like date conversion.  Here's nice JS utility funciton Steve Levithan put together:

http://blog.stevenlevithan.com/archives/date-time-format

Jim Leichliter

1 reply

Jim LeichliterCorrect answer
Legend
March 7, 2012

You can either use Advanced Actions, but I prefer JavaScript for things like date conversion.  Here's nice JS utility funciton Steve Levithan put together:

http://blog.stevenlevithan.com/archives/date-time-format

Jim Leichliter

Mr5strings
Inspiring
March 8, 2012

Thanks Jim,

It took some finagling but I'm good to go...you're a life saver!

Legend
March 8, 2012

Awesome!  Glad it worked for ya!