Hello,
Is it possible (in Houdini, Windows) to somehow extract the current time and date? I would like to append the resulting string to the name of my many test render frames…
It appears that of all the variables defined on the system, one cannot extract only the Date and Time
Any ideas?
extracting the current time and date - how?
13880 13 4- diula
- Member
- 63 posts
- Joined: July 2005
- Offline
- rdms
- Member
- 201 posts
- Joined: July 2005
- Offline
diula
Hello,
Is it possible (in Houdini, Windows) to somehow extract the current time and date? I would like to append the resulting string to the name of my many test render frames…
It appears that of all the variables defined on the system, one cannot extract only the Date and Time
Any ideas?
You could use system expression and do something like:
set a = `system(“date +%T”)` —> 18:08:16
or
set a = `system(“date +%D”)` —-> 10/22/06
or
set a = `system(“date +%D_%T”)` —-> 10/22/06_18:08:16
Hope this helps a bit
Cheers,
Rob
Digital Supervisor | Stargate Studios Toronto
Rob
Digital Supervisor | Stargate Studios Toronto
- edward
- Member
- 7710 posts
- Joined: July 2005
- Online
- Le_monkey_butt
- Member
- 166 posts
- Joined: Feb. 2006
- Offline
On Windows, you can do it more or less like in Linux without having to install Cygwin
set time = `arg(system(date),3)`;
for the date you need to get it this way:
set dayOfWeek = `arg(system(date),0)`;
set date = `arg(system(date),1)`;
set month = `arg(system(date),2)`;
Maybe a better way though….
set time = `arg(system(date),3)`;
for the date you need to get it this way:
set dayOfWeek = `arg(system(date),0)`;
set date = `arg(system(date),1)`;
set month = `arg(system(date),2)`;
Maybe a better way though….
Time to get out of this messy world.
- DriesD
- Member
- 109 posts
- Joined: July 2005
- Offline
- DriesD
- Member
- 109 posts
- Joined: July 2005
- Offline
- Le_monkey_butt
- Member
- 166 posts
- Joined: Feb. 2006
- Offline
set time = `arg(system(date),3)`;
echo $time
works
and if it doesnt work with the “date” from windows, it is because I have UnxUtils
http://sourceforge.net/projects/unxutils/ [sourceforge.net]
a bunch of UNIX utils very easy to install:
- Download
- Put the folder where ever you want
- Make sure that the environment var PATH has the directory where UnxUtils is installed….
Time to get out of this messy world.
- puma.snyder
- Member
- 121 posts
- Joined: July 2005
- Offline
- DriesD
- Member
- 109 posts
- Joined: July 2005
- Offline
- ben5ch
- Member
- 76 posts
- Joined: March 2007
- Offline
Just been playing with this problem as well. Here follows a little trick you can do get the current system time on Windows.
The $ExportNode can be any node but I used the ROP node I was executing the script from in which I needed systemtime.
opset -h off $ExportNode
opset -h on $ExportNode
set FullTime = `execute(“opstat -m $ExportNode”)`
set ExportTime = `arg($FullTime,5)`
cheers,
benS
The $ExportNode can be any node but I used the ROP node I was executing the script from in which I needed systemtime.
opset -h off $ExportNode
opset -h on $ExportNode
set FullTime = `execute(“opstat -m $ExportNode”)`
set ExportTime = `arg($FullTime,5)`
cheers,
benS
- TangheStudent
- Member
- 88 posts
- Joined: Feb. 2021
- Offline
I spend some time trying diferent system commands in the name but every timei try this the sting gets split somehow and i end up with an unnumbered 0 kb file where the name ends after the system command.
examples $HIP/render/projection/%HIPNAME_`system("powershell Get-Date -Format 'MM_dd_HH:mm'").4F.exr
yieds a folder with 1_13_12:44 no extention or anything.
are we sure $DATE isnt a thing ?
examples $HIP/render/projection/%HIPNAME_`system("powershell Get-Date -Format 'MM_dd_HH:mm'").4F.exr
yieds a folder with 1_13_12:44 no extention or anything.
are we sure $DATE isnt a thing ?
- netlander
- Member
- 27 posts
- Joined: Sept. 2017
- Offline
- tamte
- Member
- 8525 posts
- Joined: July 2007
- Offline
- Jonathan de Blok
- Member
- 251 posts
- Joined: July 2013
- Offline
-
- Quick Links