Resolved - Variable %START_DATE% Formating

The place to discuss any technical issues or suggestions in relation to BackupAssist v9.

Resolved - Variable %START_DATE% Formating

by isle-gmbh » Tue Apr 19, 2016 9:25 pm

Need the start date in this form: YYYYMMDD
%START_DATE:{YYYYMMDD}% has no effect.

The example from the documentation (Custom Scripting in BackupAssist \ Variables) doesn't work:
https://www.backupassist.com/education/resources/custom_scripting.html#tab4
isle-gmbh
User
 
Posts: 8
Joined: Thu Mar 31, 2016 9:35 pm

Re: Variable %START_DATE% Formating

by Stuart » Fri Apr 22, 2016 12:40 pm

Hi there,

It's Stuart here from the BackupAssist team, thanks for posting on our forum.

The reason why it's not working is due to you using incorrect formatting (capital and lower case letters are important in defining a variable output correctly).
This is outlined within the Microsoft link just below the example you say doesn't work within the document you linked to:
https://msdn.microsoft.com/en-us/library/8kb3ddd4(v=vs.110).aspx

As you'll see from the article above, there is no format specifier of DD or YYYY - they're dd and yyyy.

For the example you're wanting, the format is:

Code: Select all
%START_DATE:{yyyyMMdd}%


This will produce a folder named 20160422 when the date is 22nd April 2016 (the date of this post).
The output of the variable is also impacted by the time/date formats configured within Windows.
Stuart Edwards
BackupAssist Support

*Have you tried restoring from your backups lately?*
Stuart
Cortex I.T.
 
Posts: 998
Joined: Tue Sep 02, 2008 2:25 pm

Re: Variable %START_DATE% Formating

by isle-gmbh » Fri Apr 22, 2016 4:12 pm

You right, it works. But you have to set it up blind, because you see the result not before the backup is running.
For the more simple variables you have a preview of the resulting file name. It would be nice to have this for all kinds of variables, too.
isle-gmbh
User
 
Posts: 8
Joined: Thu Mar 31, 2016 9:35 pm

Re: Resolved - Variable %START_DATE% Formating

by Stuart » Sat Apr 23, 2016 12:13 am

Hi again,

I'm glad to hear that the issue is resolved.
Stuart Edwards
BackupAssist Support

*Have you tried restoring from your backups lately?*
Stuart
Cortex I.T.
 
Posts: 998
Joined: Tue Sep 02, 2008 2:25 pm


Return to Technical Support v9



Who is online

Users browsing this forum: No registered users and 1 guest

cron