Jump to content

Date_Time_GetLocalTime() help needed


jagordon
 Share

Recommended Posts

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)

Link to comment
Share on other sites

  • Developers

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 etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
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.

 

Link to comment
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.

 

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...