Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to output str variable as text?
#1
Noobie here, non-programmer.
Please help me understand my error in this macro. It is intended to produce the current date with format 2014-0303. Thank you!

Code:
Copy      Help
str s
s.timeformat("{yyyy-MMdd}")
s             ;; output date as 2014-0405
The error message says
Error in yyyy-MMdd: syntax.

-------
EDIT: Ok, now I realize that the error is in the third line. So my new question is "How can I output the formatted date (or any string variable) as text?"

-------
EDIT 2: Got it (condensing the last two lines into one):
Code:
Copy      Help
paste s.timeformat("{yyyy-MMdd}")


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)