Sign in to follow this  
Followers 0
kylek29

CurrentDate function

5 posts in this topic

Alright, I've searched for this and couldn't find an answer anywhere. I'm new to AutoIt3 so stay with me. We run hour-reports everyday at work. The process is launch-website, type in date (form fields) twice, and click submit. I've got the simple script going to the site, tabbing to the proper form box, but I can't seem to get it to populate with the currentdate - is there a way?

I need it to put the date in MM/DD/YYYY format.

Any help is appreciated.

Share this post


Link to post
Share on other sites



Check out the macro reference (time and date) in the helpfile :

$date = @MON & "/" & @MDAY & "/" & @YEAR
MsgBox(64, "", $date)

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Hi,

try this:

#include<Date.au3>
MsgBox(64, "DD/MM/YYYY", _NowDate())

Edit: Sorry missed the point that you need it with / . :">

So long,

Mega

Edited by th.meger

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites

Hi,

try this:

#include<Date.au3>
MsgBox(64, "DD/MM/YYYY", _NowDate())

Edit: Sorry missed the point that you need it with / . :">

So long,

Mega

It worked fine the other way too. Thanks a bunch. I didn't see it in the helpfile.

Share this post


Link to post
Share on other sites

Hi,

glad that I could help.

#include<Date.au3>
MsgBox( 4096, "Pc Short format", StringReplace(_DateTimeFormat( _NowCalc(),2), ".", "/"))

So long,

Mega


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0