Intelligent Automation & Macro Software  

Go Back   Automation Anywhere, Inc. Forums > Products Zone > Automation Anywhere
Register FAQ Search Today's Posts Mark Forums Read

Automation Anywhere Post messages and questions related to Automation Software here.


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-27-2008, 08:39 AM
sfgsvp sfgsvp is offline
Junior Member
 
Join Date: Feb 2008
Posts: 8
Default Two-digit Month, Day, etc.

Is it possible to get a two-digit number for the month, day, hour, minute, second system variables. For example, I would like to build today's date as "D20080227" in the format: "DYYYYMMDD", but what I get instead is: "D2008227".

The same goes for the other fields I listed where less than 10 is a possiblity.

Thanks.
Reply With Quote
  #2 (permalink)  
Old 02-28-2008, 02:12 AM
forumsupport forumsupport is offline
Senior Member
 
Join Date: Apr 2007
Posts: 1,342
Default

Hello,

In that case you can insert 'If' command to check if $Day$ or $Month$ is less then 10 and inside 'If' use 'Variable Operation' command to append 0 to $Day$ or $Month$ .
For your convenience, we have created one sample task (2DigitDayorMnth.atmn). Copy it under location, 'C:\...\My Documents\Automation Anywhere\Automation Anywhere\My Tasks' folder.

Before running this task create 2 variables namely, $UDay$ and $UMnth$ through Tools->Variable Manager.

To create variable please follow below mentioned steps,

1. Go to Tools->Variable Manager in Automation Anywhere.

2. Click on “Add New Variable”.

3. In “Name” field, enter “UDay”.

4. In “Value” field enter any value say '0'.

5. Press “Save”

6. Press “Ok”

7. Similarly, create $UMnth$ variable.

In addition, you can also configure format of $Date$ system variable from Tools->Variable Manager->System Variable->Date. Click on '...' button and select format from list.

Hope that helps.
Attached Files
File Type: atmn 2DigitDayorMnth.atmn (7.3 KB, 22 views)
Reply With Quote
  #3 (permalink)  
Old 08-27-2008, 02:11 AM
Pulse Pulse is offline
Junior Member
 
Join Date: Aug 2008
Posts: 3
Default

What I did was to write a small Javascript that returns the date for me.

The attached script takes the current date minus(-) 1 day(iow yesterday) and returns a date.
Attached Files
File Type: zip formatdate.zip (280 Bytes, 14 views)
Reply With Quote
  #4 (permalink)  
Old 10-31-2008, 10:58 AM
rlaliberte rlaliberte is offline
Junior Member
 
Join Date: Jun 2007
Posts: 29
Default

And how are you using this script?

I have had issues working with dates... did not care for the whole open Excel work around; never did get a way to pull the system date and then use it for a task.
Reply With Quote
  #5 (permalink)  
Old 10-31-2008, 11:18 AM
forumsupport forumsupport is offline
Senior Member
 
Join Date: Apr 2007
Posts: 1,342
Default

Hello,

You can use 'Run Script' command to run .vbs or .js script. You can find this command under Tasks/Scripts command category.
Reply With Quote
  #6 (permalink)  
Old 10-31-2008, 11:28 AM
rlaliberte rlaliberte is offline
Junior Member
 
Join Date: Jun 2007
Posts: 29
Default

Obviously I have been missing something for the last year or so... I never knew about these system variables, where I could pull the date.

How is the reformatted date returned to the task?
Reply With Quote
  #7 (permalink)  
Old 10-31-2008, 11:39 AM
forumsupport forumsupport is offline
Senior Member
 
Join Date: Apr 2007
Posts: 1,342
Default

Hello,

Using Run Script command,

. You can run other VB Scripts (*.vbs) or JScripts (*.js) from a task.
. You can also pass parameters to your scripts.
. There is also an option to specify the return value in your scripts.
Reply With Quote
  #8 (permalink)  
Old 10-31-2008, 11:56 AM
rlaliberte rlaliberte is offline
Junior Member
 
Join Date: Jun 2007
Posts: 29
Default

Quote:
Originally Posted by forumsupport View Post
Hello,

. There is also an option to specify the return value in your scripts.
Where is this option?
Reply With Quote
  #9 (permalink)  
Old 10-31-2008, 10:16 PM
forumsupport forumsupport is offline
Senior Member
 
Join Date: Apr 2007
Posts: 1,342
Default

Hello,

Attached is the screenshot of Run Script command showing option to specify return value.
Attached Images
File Type: jpg ReturnValueOption_RunScriptCmd.jpg (8.2 KB, 14 views)
Reply With Quote
  #10 (permalink)  
Old 11-01-2008, 09:06 AM
rlaliberte rlaliberte is offline
Junior Member
 
Join Date: Jun 2007
Posts: 29
Default

What version is this available in?

Does not seem to be available in my version.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -7. The time now is 08:29 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.0.0 ©2007, Crawlability, Inc.
Copyright © 2003-2011 Automation Anywhere, Inc. All rights reserved