Network Automation Software We are currently migrating this forum
over to our HelpSystems domain. Please
post all new threads in our new
HelpSystems Community Portal.
Post to the HelpSystems Forum
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: DATE FORMAT
Topic Summary:
Created On: 10/29/2013 04:15 AM
Status: Read Only
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.
 10/29/2013 04:15 AM
User is offline View Users Profile Print this message

Author Icon
JesperBessing
Student (5-19 posts)

Posts: 10
Joined: 11/20/2009

Hi

I want to convert a date variable from a dataset (thedataset.n) which is in format m/d/yyyy to mm.dd.yyyy. Using the attached function I will only get today's date.

Any help will be appreciated.

Thks



 Category Survey



Task Steps: (Right click, Select All, Copy to copy to the clipboard. Steps can then be pasted into the AutoMate Task Builder)
 10/29/2013 04:55 AM
User is offline View Users Profile Print this message

Author Icon
SarathiKamaraj
Artisan (200-499)

Posts: 244
Joined: 07/30/2012

Hi Jasper,

 

If you need other date other than today's date specify it in the specified time as given below



 Category Survey



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


-------------------------
Thanks,
Sara
 10/29/2013 06:07 AM
User is offline View Users Profile Print this message

Author Icon
JesperBessing
Student (5-19 posts)

Posts: 10
Joined: 11/20/2009

Thks yr help

Yes - I need other date than today's date..

Unfortunatly I'm on Automate 6 so AMTEXTFORMATDATETIME and AMSHOWDIALOG does not work..

But now I have the date in a variable called DATE_FROM

The value rigth now is 6/10/2013 (m/d/yyyy) - this value should be converted to dd.mm.yyyy .



 Category Survey



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

Author Icon
SarathiKamaraj
Artisan (200-499)

Posts: 244
Joined: 07/30/2012

I am not sure abt Automate 6

 

I am using BPA Server.

 

If the code you have given in the start of the forum works for you then the code given below should work.

 

N/A guys and other experts can give you more insight on this......



 Category Survey



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


-------------------------
Thanks,
Sara
 10/29/2013 06:49 AM
User is offline View Users Profile Print this message

Author Icon
JesperBessing
Student (5-19 posts)

Posts: 10
Joined: 11/20/2009

Hi Sara,

I get flw. error when inserting the code

"
Invalid character in parameter name. Expecting recognized character or an equal sign.
Filename:
Last line read %the Dataset.N%
Line Number 2
Character position: 79
"


 Category Survey
 10/29/2013 07:34 AM
User is offline View Users Profile Print this message

Author Icon
SarathiKamaraj
Artisan (200-499)

Posts: 244
Joined: 07/30/2012

can you post the steps you tried?



 Category Survey


-------------------------
Thanks,
Sara
 10/29/2013 08:11 AM
User is offline View Users Profile Print this message

Author Icon
JesperBessing
Student (5-19 posts)

Posts: 10
Joined: 11/20/2009

Here ia all the steps

 Category Survey



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

Author Icon
JesperBessing
Student (5-19 posts)

Posts: 10
Joined: 11/20/2009

The closest I can get to your code is



But task will stop with an error "Date/Time Format incorrect

 Category Survey
 10/29/2013 08:22 AM
User is offline View Users Profile Print this message

Author Icon
SarathiKamaraj
Artisan (200-499)

Posts: 244
Joined: 07/30/2012

i cannot use your code.

 

shows some kinda error. May be due to code written in automate and i am using BPA Task builder.

 

May be N/A guys can be of more help....



 Category Survey


-------------------------
Thanks,
Sara
 10/29/2013 08:22 AM
User is offline View Users Profile Print this message

Author Icon
JesperBessing
Student (5-19 posts)

Posts: 10
Joined: 11/20/2009

Code..

 Category Survey
 10/29/2013 08:23 AM
User is offline View Users Profile Print this message

Author Icon
SarathiKamaraj
Artisan (200-499)

Posts: 244
Joined: 07/30/2012

Originally posted by: JesperBessing The closest I can get to your code is

But task will stop with an error "Date/Time Format incorrect

 

Can you just post the code of Format Date/Time?



 Category Survey


-------------------------
Thanks,
Sara
 10/29/2013 08:26 AM
User is offline View Users Profile Print this message

Author Icon
SarathiKamaraj
Artisan (200-499)

Posts: 244
Joined: 07/30/2012

Originally posted by: JesperBessing Code..

 

 

No code is displayed. Please post the code again.



 Category Survey


-------------------------
Thanks,
Sara
 10/29/2013 08:27 AM
User is offline View Users Profile Print this message

Author Icon
Leonard Amabile
HelpSystems

Posts: 5454
Joined: 05/15/2007

Jesper,

Are you trying to update the dataset field within the dataset? Try adding this dialog box in the code below. This will format the data field into the format you want but it will not update the field.



 Category Survey
AutoMate 6 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
 10/30/2013 02:53 AM
User is offline View Users Profile Print this message

Author Icon
JesperBessing
Student (5-19 posts)

Posts: 10
Joined: 11/20/2009

THANK YOU

I changed it a little bit as I needed it in dd.mm.yyyy format and then I inserted the code in the "send keystrokes" where I needed it..

Works exactly as expected..

Thks to you and to all who tried to help me..

Jesper

 Category Survey
Statistics
18258 users are registered to the AutoMate Discussion forum.
There are currently 0 users logged in.
The most users ever online was 6686 on 11/01/2020 at 01:24 AM.
There are currently 2407 guests browsing this forum, which makes a total of 2407 users using this forum.

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

Sitemap Network Automation Software Blog