How to get current system date and time to a variable ?

How to get current system date and time to a variable ?

Thanks.

Both to one variable?

:global DateTime ([ / system clock get date ] . " " . [ / system clock get time ]);

If you want each in one varaiable:

:global Date [ / system clock get date ];
:global Time [ / system clock get time ];