Hi,
I need to do some scripting to analyse dates. After some calculation I have a date in format dd.mm.yyyy hh:nn:ss. I need to change this to format yyyymmdd_hhnn. So I tried “format” which will do very fine in excel VBA. In Automise it produces an error (variable is not defined: “Format”). Is there a chance to use the function “format”? At the moment I use the function “mid”. That works, but is far less elegant.
Is there an action to subtract some minutes from a timespamp in format yyyymmdd_hhnn in automise? Maybe I don’t need to use DateAdd in VB.
I have Automise 4.0.0.721 and Win 7.
Regards,
HHK
You can put the date value into a date variable with in Automise. Then set its format string to yyyymmdd_hhnn, then simply use it as a string.
To perform date maths on the variable there is a Get Date Time action. This allows for getting the date and time now, or simply using the value already stored in a date time variable. It also allows date/time manipulation and writing out the date in the format you require.
I know this is old, but the final reply is incorrect. You cannot “use the value already stored in a date time variable” to start manipulating. It would be great if you could do date math starting with the value in a date/time variable, but you can only start with the current date/time or a specified date/time, not a date/time variable.
I’m looking into this. The GetDateTime action really should allow using an existing variable as the source of the datetime.
An enhancement to this area would be fantastic.
I have uploaded a build which enhances the GetDateTime action to allow using a DateTime variable as the source of the date to manipulate
http://downloads.finalbuilder.com/downloads/automise/500/AT500_1179.exe
http://downloads.finalbuilder.com/downloads/automise/500/ATCMD500_1179.exe
http://downloads.finalbuilder.com/downloads/automise/500/AutomiseRunner500_1179.exe