cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Voyager
Voyager
208 Views
Registered: ‎04-12-2012

Filtering a TCL string

Jump to solution

Hello,

Vivado is able to print the current date to the console using the following commands:

set start [clock seconds]
puts "[clock format $start -format %D]"

The date that will be printed will be:

02/14/2020

Can you please post an example of a TCL script that would filter out the output of the above command to just print the day of the month (14 in this example) ?

14

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Scholar
Scholar
182 Views
Registered: ‎08-01-2012

Re: Filtering a TCL string

Jump to solution

Google returned the answer probably quicker than you typed the message:

replace %D with %d

https://www.tcl.tk/man/tcl8.6/TclCmd/clock.htm

View solution in original post

1 Reply
Highlighted
Scholar
Scholar
183 Views
Registered: ‎08-01-2012

Re: Filtering a TCL string

Jump to solution

Google returned the answer probably quicker than you typed the message:

replace %D with %d

https://www.tcl.tk/man/tcl8.6/TclCmd/clock.htm

View solution in original post