Sign in to follow this  
Followers 0
PoojaKrishna

Date format

3 posts in this topic

Hai friends,

Please help

In my Data Base, the field date has MM/dd/yyyy format but I'm getting the date in my script from the database in dd/mm/yyyy format. How could I get this date in the same format as in the database(MM/dd/yyyy).

Pooja.

Share this post


Link to post
Share on other sites



;Convert DD/MM/YYYY to MM/DD/YYYY
$original = "30/04/1980"
$new = StringRegExpReplace($original, "\A(\d*)/(\d*)/(\d*)","$2/$1/$3")
MsgBox(0,"","Before: " & $original & @CRLF & "After: " & $new)

Share this post


Link to post
Share on other sites

Thanks Weaponx

The AutoIt always shows the date in the local format, so it is dd/MM/yyyy in my system.

So before changing the date format,I have to check the local format. How could I check that?

Pooja

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