Network Automation Software
You are not currently logged on. You must be logged on in order to post. Log on
Or Create a new account
AutoMate Discussion
Decrease font size
Increase font size
Topic Title: LastDate in Previous Month
Topic Summary:
Created On: 08/22/2017 08:15 AM
Status: Post and Reply
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
View similar topics View similar topics
View topic in raw text format. Print this topic.
Answer This question was answered by LaurieBeffa, on Wednesday, August 23, 2017 1:10 PM

Answer:
Thank you! That will work great.

Laurie
 08/22/2017 08:15 AM
User is offline View Users Profile Print this message

Author Icon
LaurieBeffa
Student (5-19 posts)

Posts: 18
Joined: 01/25/2011

I need to get the Last Date for the last day of the previous month to add to a file name. Is there a way to do this in version 7?

Thank you,
Laurie

 Category Survey
AutoMate 7 version: 7.0.8
Windows version: Windows 7
 08/22/2017 12:36 PM
User is offline View Users Profile Print this message

Author Icon
Devin Cannon
HelpSystems

Posts: 326
Joined: 03/17/2016

Hi Laurie,

I couldn't find a super easy way to do this, but managed to get the date with a few steps.  Please see the attached task.



 Category Survey
AutoMate 7 version:
Windows version:





-------------------------

Devin Cannon | Support Analyst
AutoMate | Division of HelpSystems
HelpSystems, LLC | T: +1.213.738.1700 | F: +1.213.738.7665
 08/22/2017 01:13 PM
User is offline View Users Profile Print this message

Author Icon
Leonard Amabile
HelpSystems

Posts: 5331
Joined: 05/15/2007

Hi Laurie,

Using a VB function may accomplish this. Please see below.

 Category Survey
AutoMate 7 version:
Windows version:



Task Steps: (Right click, Select All, Copy to copy to the clipboard. Steps can then be pasted into the AutoMate Task Builder)


-------------------------

Leonard Amabile | Director, Cross Platform Support
AutoMate | InterMapper | Skybot | Divisions of HelpSystems
T: +1.213.738.1700 | F: +1.213.738.7665
 08/23/2017 05:29 AM
User is offline View Users Profile Print this message

Author Icon
LaurieBeffa
Student (5-19 posts)

Posts: 18
Joined: 01/25/2011

I tried to add this to the Rename File action and get an error: File and folder names cannot contain any of the following: /:"<>

Thoughts?

Thank you,
Laurie

 Category Survey
AutoMate 7 version: 7.0.8
Windows version: Windows 7



Task Steps: (Right click, Select All, Copy to copy to the clipboard. Steps can then be pasted into the AutoMate Task Builder)
 08/23/2017 12:29 PM
User is offline View Users Profile Print this message

Author Icon
Alex Escalante
HelpSystems

Posts: 710
Joined: 02/26/2014

Hello Laurie,

Since the expression results in a date format that uses the "/" symbol, Windows is informing us that it is not able to use it to name files.

That being the case, you will need to replace the "/" symbols with "_" for example. Here is a short example of how to accomplish this:

 Category Survey
AutoMate 7 version:
Windows version:



Task Steps: (Right click, Select All, Copy to copy to the clipboard. Steps can then be pasted into the AutoMate Task Builder)


-------------------------

Alex Escalante | Support Analyst
AutoMate | Division of HelpSystems
HelpSystems, LLC | T: +1.213.738.1700 | F: +1.213.738.7665
 08/23/2017 12:35 PM
User is offline View Users Profile Print this message

Author Icon
Alex Escalante
HelpSystems

Posts: 710
Joined: 02/26/2014

...Alternatively, you can also use the format date/time action to accomplish the same (see code below).

You would then reference the variable at the end of the file name.

Let us know if these work for you.


 Category Survey
AutoMate 7 version:
Windows version:



Task Steps: (Right click, Select All, Copy to copy to the clipboard. Steps can then be pasted into the AutoMate Task Builder)


-------------------------

Alex Escalante | Support Analyst
AutoMate | Division of HelpSystems
HelpSystems, LLC | T: +1.213.738.1700 | F: +1.213.738.7665
 08/23/2017 01:10 PM
User is offline View Users Profile Print this message

Author Icon
LaurieBeffa
Student (5-19 posts)

Posts: 18
Joined: 01/25/2011

Answer Answer
Thank you! That will work great.

Laurie

 Category Survey
AutoMate 7 version: 7.0.8
Windows version: Windows 7
Statistics
17774 users are registered to the AutoMate Discussion forum.
There are currently 1 users logged in.
The most users ever online was 4101 on 09/26/2017 at 01:25 PM.
There are currently 1148 guests browsing this forum, which makes a total of 1149 users using this forum.

FuseTalk Enterprise Edition v4.0 - © 1999-2017 FuseTalk Inc. All rights reserved.

Sitemap Network Automation Software Blog