system("date /T") on windows not working

   3581   5   0
User Avatar
Member
14 posts
Joined: June 2011
Offline
Hi,

I have a font operator which I would like to display the current date. When I use `system (“date /T”)` I get no result. `system (“echo 123”)` is working though and so is `system (“ipconfig”)`, ect.


Is this a bug with houdini not understanding the “date” command or am I missing something?

Thanks!
User Avatar
Member
168 posts
Joined:
Offline
does `system(date)` (works for you?)
Albert
User Avatar
Member
14 posts
Joined: June 2011
Offline
tmdag
does `system(date)` (works for you?)

..no
User Avatar
Member
112 posts
Joined: Oct. 2011
Offline
it does not work because on windows “date” waits for user input. If you use “date /t” it should actually work (on the standard windows console it does). But trying it in houdini I do not get any output. I have two explanations for this:

1) date /t writes not to the standard output (maybe stderr)
2) its a bug in houdini
Pipeline @ RISE Visual Effects Studios
User Avatar
Member
51 posts
Joined: Oct. 2006
Offline
I believe on Windows system() uses c-shell, not the native command processor, and this causes problems with built-in commands such as ‘date’. You can try the following expression (it works for me):
`system(“cmd /C date /T”)`
User Avatar
Member
14 posts
Joined: June 2011
Offline
axebeak
I believe on Windows system() uses c-shell, not the native command processor, and this causes problems with built-in commands such as ‘date’. You can try the following expression (it works for me):
`system(“cmd /C date /T”)`


here too, thanks a lot!
  • Quick Links