Jump to content

Getting the Year as two digits


mspoula
 Share

Recommended Posts

found the answer.

$date = "20/01/2009"

MsgBox (0, $date & "(dd/mm/yyyy)", _EditDate ($date) & " (yy-mm-dd)")

Func _EditDate ($datestr)

$sD = StringSplit ($datestr, "/")

$day = StringRight ($sD[1], 2)

$month = StringRight ($sD[2], 2)

$year = StringRight ($sD[3], 2)

Return $year & "-" & $month & "-" & $day

EndFunc

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...