×

Warning message

  • Cisco Support Forums is in Read Only mode while the site is being migrated.
  • Cisco Support Forums is in Read Only mode while the site is being migrated.

Add timestamp using variable

Answered Question
Mar 4th, 2014
User Badges:

Date stamp was easy to create using a custom format variable, but I cannot see how to do the same for a time stamp.  I would need a time stamp format without colons or slashes that would be rejected as a filename.  


Can a custom format Time variable be created?  Or has anyone created a job which adds timestamps to files?   I can script it of course, but looking for a clean all purpose time stamp process.


thanks        

Correct Answer by Marc Clasby about 3 years 5 months ago

For a file stamp the tidal system date is easy solution (you can use any date type variable)

Tidal Variables

Use system time (typically you add via variable button)

Take and remove :

and you will just get the numbers

use that as a tag to job


if you use Powershell you could use the get-date function as well depending ans format it depending on what you want to do.i


Marc

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (2 ratings)
Loading.
Correct Answer
Marc Clasby Tue, 03/04/2014 - 12:17
User Badges:

For a file stamp the tidal system date is easy solution (you can use any date type variable)

Tidal Variables

Use system time (typically you add via variable button)

Take and remove :

and you will just get the numbers

use that as a tag to job


if you use Powershell you could use the get-date function as well depending ans format it depending on what you want to do.i


Marc

Bill Slobodnik Tue, 03/04/2014 - 13:39
User Badges:

Thanks Marc.   I did not realize I could actually edit the variable format once it was added to the job.  Too easy!

Actions

This Discussion