Message 1 of 8
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello all,
I want to write a routine to put the following year onto my drawing index page. I found this function in some old code written before I started, and I didn't know if there was way to reverse the rtos.
(defun :GETDATE (/ x)
(setq x (getvar "CDATE")) ;; CURRENT DATE
(setq x (rtos x 2 6)) ;; CONVERT TO STRING
(setq date (strcat (substr x 5 2) "/" ;; MM
(substr x 7 2) "/" ;; DD
(substr x 3 2) " ") ;; YY
)
)
My thought process is I can use the rtos to isolate the year from CDATE in a YYYY format, then convert it back into an INT/REAL and increment it to print it onto a tag on my drawing index. But I don't know how to go about converting it back into an INT/REAL, if that's at all possible. If anyone has any suggestions, please let me know.
Thank you!
-JD
Solved! Go to Solution.