Jump to content

over date


Recommended Posts

hi,

is there a function which checks if a spicifice date is been.

for example:

it is now 25 april 2006 and i want to know if that is later then 13 august 2005.

is there a function to check this?

Link to comment
Share on other sites

hi,

is there a function which checks if a spicifice date is been.

for example:

it is now 25 april 2006 and i want to know if that is later then 13 august 2005.

is there a function to check this?

You might also find the various functions of the Date.au3 UDF, like _DateDiff(), useful.

:D

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

Hi,

maybe this helps you to start.

MsgBox(64, "checkDate", checkDate("1970/01/01", "1970/01/01"))

Func checkDate($dateToCheck, $dateToCompare)
    If _DateIsValid($dateToCheck) And _DateIsValid($dateToCompare) Then
        Local $diff = _DateDiff('s', $dateToCheck, $dateToCompare)
        Select
            Case $diff < 0
                Return 0;earlier
            Case $diff > 1
                Return 1;later
            Case $diff = 0
                Return 2;equal
        EndSelect
    Else
        Return -1
    EndIf
EndFunc  ;==>checkDate

So long,

Mega

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

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