Hi,
I want to add a date into my prototype and have it automatically update its self depending what date it actually is, any ideas?
Hi,
I want to add a date into my prototype and have it automatically update its self depending what date it actually is, any ideas?
The easiest way to do this is to just use the [[Now]] variable.
OnLoad
Set text on dateWidget: [[Now]]
The only this is that comes out looking like this: Thu Oct 12 2017 09:36:03 GMT-0500 (CDT). I’m guessing you don’t want that.
Instead you might use: [[now.getDate()]]/[[now.getMonthName()]]/[[now.getFullYear()]]
That comes out as: 12/October/2017
What expression to use exactly depends on how you want it formatted.
Thanks worked a treat!
Is there a way to make [[now.getDate()]]/[[now.getMonthName()]]/[[now.getFullYear()]] come out as short date format
So instead of 12/October/2018 you would get 12/Oct/2018?
Thanks
Rob
Change
[[now.getMonthName()]]
to
[[now.getMonthName().substr(0,3)]]
Thanks perfect!