Creating A String From Todays Date 追蹤

0

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 意見

0
Avatar
Legacy Poster
評論操作 永久連結

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

0
Avatar
Ian Cummings
版主
評論操作 永久連結

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.

登入寫評論。