Jump to content
Sign in to follow this  

_ArrayToString or $array[n]

Recommended Posts


$txtDESPDATE seems to be a date control.

You can use GUICtrlSendMsg($txtDESPDATE, $DTM_SETFORMATW, 0, "yyyyMMdd") to have the good format directly with GUICtrlRead :

#include <DateTimeConstants.au3>
#include <GuiDateTimePicker.au3>

GUICreate("", 250, 80)
$txtDESPDATE = GUICtrlCreateDate("date", 10, 10)
GUICtrlSendMsg($txtDESPDATE, $DTM_SETFORMATW, 0, "yyyyMMdd")

$button = GUICtrlCreateButton("Get time", 10, 50, 100, 25)


While 1
    $msg = GUIGetMsg()
    If $msg = -3 Then Exit
    If $msg = $button Then  MsgBox( 0, "",   GUICtrlRead($txtDESPDATE)   )

To answer to you question, i would say the first way is faster

Edited by jguinch

Share this post

Link to post
Share on other sites

As for which is "correct", I would use the latter if you want the entire array in the string. I would use the former if I wanted to concatenate only certain elements of an array (0, 1, 3 but not 2, 4, or 5, for example). As far as which would be faster...try it. ;)

√-1 2^3 ∑ π, and it was delicious!

Share this post

Link to post
Share on other sites

Thanks guys, just thought I would put it out there, I will experiment.

Thanks for the suggestion jguinch I will give that a go.

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  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.