Sign in to follow this  
Followers 0
jagordon

Date_Time_GetLocalTime() help needed

5 posts in this topic

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



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


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                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

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

#4 ·  Posted (edited)

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

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  
Followers 0