Tool
DateTime.nlm creates a new console command "DT" that prints the current date/time to the logger screen.
Module is DateTime.NLM, usage is:
Load DateTime
then from console or .ncf file
DT <format string>
where <format string> can include:
c - shortdateformat + ’ ’ + shorttimeformat d - day of month dd - day of month (leading zero) ddd - day of week (abbreviation) dddd - day of week (full) ddddd - shortdateformat - eg 15-01-08 dddddd - longdateformat - eg 15 January 2008 m - month mm - month (leading zero) mmm - month (abbreviation) mmmm - month (full) y - year (four digits) yy - year (two digits) yyyy - year (with century) h - hour hh - hour (leading zero) n - minute nn - minute (leading zero) s - second ss -second (leading zero) t - shorttimeformat tt - longtimeformat am/pm - use 12 hour clock and display am and pm accordingly a/p -use 12 hour clock and display a and p accordingly / - insert date separator : -insert time separator 'xx' or "xx" literal text
Note that literal strings need to be in quotes eg: "some text" or 'some text'
so eg:
cmd: DT
out: 2008-1-15 11:28
cmd: DT hh:nn:ss am/pm
out: 11:28:12 am
cmd: DT "Starting cron job:" ddd dd-mm-y hh:nn:ss am/pm
out: Starting cron job: Tue 15-01-2008 11:28:12 am
etc.
| Bilaga | Storlek |
|---|---|
| datetime.zip | 35.55 kB |
Disclaimer: As with everything else at Cool Solutions, this content is definitely not supported by Novell (so don't even think of calling Support if you try something and it blows up).
It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test, test, test before you do anything drastic with it.
Related Articles
User Comments
- Be the first to comment! To leave a comment you need to Login or Register
- 5427 reads



0