1 Reply Latest reply on Aug 13, 2013 1:31 PM by philmodjunk

    CurrentDate calculations in a text box



      CurrentDate calculations in a text box


           Hi there, quick question if anyone can help me... :)

           So, I'm in Layout mode and I have this piece of code in a normal text box:

           [code]Expected Deliveries from Today , {{CurrentDate}}[/code]

           What I need is it to say this:

           [code]Expected Deliveries from Today,  {{CurrentDate}} through {{CurrentDate + 5}}[/code]

           When I browse it, though, I get this:

           [code]Expected Deliveries from Today,  8/13/2013 through {{CurrentDate + 5}} [/code]

           Not: Expected Deliveries from Today 8/13/2013 through 8/18/2013

           The Script is already doing the conversion elsewhere, so I can't pull the +5 days from the table... and naturally, everything on the web wants me to use Get(CurrentDate) which doesn't work in a text box...

           Can anyone help me out on this?  this is my absolute last action item on my to do list, and it's taken me an hour... more time than it's worth ;) :D





        • 1. Re: CurrentDate calculations in a text box

               use a variable such as <<$DatePlus5>>

               in place of {{CurrentDate + 5}}

               Then you need to assign a date toe $DatePlus5. A script can do this or you can use a conditional format expression so long as you are not publishing the layout to the web.

               The conditional format expression would be something like:

               Let ( $DatePlus5 = Get ( CurrentDate ) + 5 ; 1 )

               Some developers put hidden layout text on their layout and then use the Let function in the conditional format expression for that text to assign values to such variables.