Posts: 4
Threads: 2
Joined: Apr 2003
My very first excursion into this great program, so be kind. I've been trying to write a macro to insert the system date into a text editor. All the format options are nice and when I overcome the first step I'll try 'em out. Right now the system short form will do. Please point the way.
RS
Posts: 12,087
Threads: 142
Joined: Dec 2002
1. Declare str variable.
2. With that variable, call function time with formatting string.
3. Paste that variable.
Example1 - month/day/year
More date-time formatting examples
Example2 - date
Example3 - date and time
Example4 - short-weekday short-month day hour:min
out s.time("%a %b %#d %H:%M")
As you see, %x is replaced to date, %#d to day, etc.
Characters that aren't preceded by % (in example - spaces and colon) are unchanged.
Posts: 4
Threads: 2
Joined: Apr 2003
Thank you, kind one! I thought it would be simple and it was, but somehow I missed the declaration. Also took a look at the dll GetLocalTime function and at least printed out the Hour. But that is the long way, I think.
RS