Jump to content
Sign in to follow this  
testbytest

how to chack date ?

Recommended Posts

testbytest

i want check date like 2008/11/30

then run dome script

i know use _NowDate() to get date

but how to ckeck it

thanks

Share this post


Link to post
Share on other sites
testbytest

i write script at 2008/10/31

#include <Date.au3>

$sDatePart = StringSplit(_NowDate(), "/n")
MsgBox(0,'',"The Date is : " & $sDatePart[1] & "/" & $sDatePart[2] & "/" & $sDatePart[3], 0)
If $sDatePart[2]== 10 && $sDatePart[3] == 31 Then
    MsgBox(0,'',"The Date is : " & $sDatePart[2] & "/" & $sDatePart[3], 0)
    Exit

EndIf

MsgBox(0,'',"The Date is ERROR ", 0)
Exit

but it say "If $sDatePart[2]== 10 && $sDatePart[3] == 31 Then " is error

what hapend

final

i find If $sDatePart[2]== 10 AND $sDatePart[3] == 31 is working

Edited by testbytest

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  

×