Okay Glenn - here is some explanation of what I'm doing in the code per your suggestion.
@DATE
Returns this for me: 2006/12/06
@TIME
Returns this for me: 17:24:16
So we use the function SPLIT and assign it to our variable (in this case $Archive)
SPLIT
Returns a zero-based, one-dimensional array containing a specified number of substrings.
Syntax: Split (“string”, “delimiter”, count)
We use the delimiter of / in the code: Split(@DATE,'/') which basically removes the /
We then use the JOIN function to replace the / with a - (because a / on Windows is not a valid file/folder name)
JOIN
Creates a string by concatenating the elements of an array.
Syntax: Join (array, “delimiter”, count)
Then to get the TIME we do similar but this time we use the : as the delimiter for SPLIT and then replace it with nothing.
If we did not use the JOIN function then our var would still contain an array which is not as easily used for what we're trying to do here.
I use the +'_'+ to place the _ character between the DATE and TIME
For my system I have the dates display 2 characters for all months and days so this coding works well for me.
If your system returns single characters for months, or days 1 - 9 then you should be able to manage that in the Control Panel settings of your system.
Although according to the manual the KiXtart @DATE will return the date in this format every time: Date (in the format YYYY/MM/DD)
.