|About Time and Date commands there is no need to code anything as you can directly access the system variables (to be not modified!) %time% and %date%.|
About other commands you can issue the For /F statement, i.e.
for /F "delims=" %%j in ('Win_Command') do set Var=%%j
but that instruction is more useful if joined with parsing options. This however is far beyond a short note. To know more type For /? at command prompt.