Sign in to follow this  
Followers 0
anixon

Date Format

7 posts in this topic

I have probably invested about 4 hours using Help trying to get a dd/mm/yyyy formated date so please be patient I'm still learning.....

My routine is:

#include <Date.au3>

$file = FileOpen(@scriptdir & "\VMonitorLog.txt", 9)

FileWriteLine($file, "Successful Autostart " & _DateTimeFormat( _NowCalc(),0))

FileClose($file)

It gives me in the following notation in the log file:

Successful Autostart 11/29/2006 12:54:30 PM

The date format I want to achieve is

Successful Autostart 29/11/2006 12:54:30 PM

;) Ant

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Check out the Date and Time macros in the help files.

What you'd want then, is something like...

$myDateString = "" & @MDAY &"/"& @MON & "/" & @YEAR & " - " & @HOUR& ":" & @MIN & ":" & @SEC  & ""oÝ÷ Ù:-zËcºËkº{aÉb¶Ù^±Êâ¦Ö®¶­sbb33c¶×FFU7G&ærÒgV÷C²gV÷C²fײÔDfײgV÷C²ògV÷C²fײÔôâfײgV÷C²ògV÷C²fײT"fײgV÷C²ÒgV÷C²fײõU"fײgV÷C³¢gV÷C²fײÔâfײgV÷C³¢gV÷C²fײ4T2fײgV÷C²gV÷C°¤×6t&÷ÂgV÷C·FW7BgV÷C²Âb33c¶×FFU7G&ær
Edited by JRowe_1

Share this post


Link to post
Share on other sites

$file = FileOpen(@scriptdir & "\VMonitorLog.txt", 9) 
FileWriteLine($file, "Successful Autostart " & @MDAY & "/" & @MON & "/" & @YEAR & " " & @HOUR & ":" & @MIN & ":" & @SEC)
FileClose($file)

The clock is in 24 hour format, I'm sure you can figure out how to change it if you want.


IE Dev ToolbarMSDN: InternetExplorer ObjectMSDN: HTML/DHTML Reference Guide[quote]It is surprising what a man can do when he has to, and how little most men will do when they don't have to. - Walter Linn[/quote]--------------------[font="Franklin Gothic Medium"]Post a reproducer with less than 100 lines of code.[/font]

Share this post


Link to post
Share on other sites

Oh I want to play, too!...

...but that was the easy way :-)

[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites

$file = FileOpen(@scriptdir & "\VMonitorLog.txt", 9) 
FileWriteLine($file, "Successful Autostart " & @MDAY & "/" & @MON & "/" & @YEAR & " " & @HOUR & ":" & @MIN & ":" & @SEC)
FileClose($file)

The clock is in 24 hour format, I'm sure you can figure out how to change it if you want.

Thank you very much for your help it works just fine. For some whilst Help is very helpful on understanding some things is not always that obvious. So much to learn so little time. Promise not to ask that question again......

Cheers ;) Ant

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