Sign in to follow this  
Followers 0
GrungeRocker

Convert dates in var

4 posts in this topic

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]

Share this post


Link to post
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}>

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

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
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?

Share this post


Link to post
Share on other sites

ok thank you!

i didnt think of splitting the string -.-


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

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