Jump to content

Convert dates in var


Recommended Posts

hi!

if i have made sth like this:

$Datum = GuiCtrlCreateDate("Date4", 90, 60, 190, 20, $DTS_SHORTDATEFORMAT)
$date = guictrlread($datum)

$date is like thi: dd.mm.yyyy

but how could i make it, that its like: yyyy/mm/dd, so that i can use _datediff ?

[font="Verdana"]In work:[list=1][*]InstallIt[*]New version of SpaceWar[/list] [/font]

Link to comment
Share on other sites

  • Developers

hi!

if i have made sth like this:

$Datum = GuiCtrlCreateDate("Date4", 90, 60, 190, 20, $DTS_SHORTDATEFORMAT)
$date = guictrlread($datum)

$date is like thi: dd.mm.yyyy

but how could i make it, that its like: yyyy/mm/dd, so that i can use _datediff ?

<{POST_SNAPBACK}>

$t = StringSplit($date,'.')
$Date = $t[3] & "/" & $t[2] & "/" $t[1]

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

hi!

if i have made sth like this:

$Datum = GuiCtrlCreateDate("Date4", 90, 60, 190, 20, $DTS_SHORTDATEFORMAT)
$date = guictrlread($datum)

$date is like thi: dd.mm.yyyy

but how could i make it, that its like: yyyy/mm/dd, so that i can use _datediff ?

<{POST_SNAPBACK}>

read example 3 in the doc. does that help?
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...