Jump to content
Sign in to follow this  
jagordon

Date_Time_GetLocalTime() help needed

Recommended Posts

jagordon

Ok, I know there has got to be a simple explanation for this....

When I run this code, $tcur is always blank. What am I missing here?

#include <date.au3>

Global $tCur = _Date_Time_GetLocalTime()

$tCur = _Date_Time_GetLocalTime()

msgbox(0, "test", $tcur)

Share this post


Link to post
Share on other sites
Jos

Two options here:

#include <date.au3>
Global $tCur
$tcur = _Date_Time_GetLocalTime()
$tCur2 = _Date_Time_SystemTimeToDateTimeStr($tcur)
Msgbox(0, "test", $tcur2)
; - or - 
$tCur = _Now()
Msgbox(0, "test", $tcur)

Jos


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

Share this post


Link to post
Share on other sites
GaryFrost

Ok, I know there has got to be a simple explanation for this....

When I run this code, $tcur is always blank. What am I missing here?

#include <date.au3>

Global $tCur = _Date_Time_GetLocalTime()

$tCur = _Date_Time_GetLocalTime()

msgbox(0, "test", $tcur)

The return type.


SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites
rmarino

This will work:

#include <date.au3>

$var = _Date_Time_GetLocalTime()

msgbox(0,"", _Date_Time_SystemTimeToDateTimeStr($var))

Edited by rmarino

Share this post


Link to post
Share on other sites
GaryFrost

This will work:

#include <date.au3>

$var = _Date_Time_GetLocalTime()

msgbox(0,"", _Date_Time_SystemTimeToDateTimeStr($var))

Jos already gave a sample of how to use it.


SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

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  

×