Creating A String From Todays Date Follow

0
Avatar
Legacy Poster

Hi, I think this is probably an easy one but please bear with me I am new here! :mellow:

 

I want to be able to convert todays date (today being 5th July 2013) into a string 130705.  I have tried using Month(Now) but i just get 7.

 

I have tried using the If function to check the length of the returned value Len(cStr(Month(Now)) but keep getting a syntax error.

 

Also how do I get multi line code in the Script assistant?

 

Thanks

 

Ian

2 comments

0
Avatar
Legacy Poster
Comment actions Permalink

Set your object to be a Data Source of Date and select the appropriate format.

0
Avatar
Ian Cummings
Moderator
Comment actions Permalink

Assuming that you're using an older version of BarTender...  Create a separate sub-string for each component part of the date.  For the month you could then set the minimum number of characters to two, via the "More Options" dialog, padding with zero when needed.

Please sign in to leave a comment.