Jump to content
Sign in to follow this  
infernothebest

calender check

Recommended Posts

infernothebest

i wanna make a calender check but it doesnt work, it must prevent that users can select a date before @year/@mon/@day

#include <Math.au3>
$Date = GUICtrlCreateMonthCal (@YEAR&"/"&@MON&"/"&@MDAY,50, 50,165,140,"",$GUI_DOCKSIZE)
$time = @YEAR&@mon&@day
$compairtime =  _Min($Date , $time)
MsgBox(0,"",$compairtime)
Edited by infernothebest

Share this post


Link to post
Share on other sites
erezlevi

i wanna make a calender check but it doesnt work, it must prevent that users can select a date before @year/@mon/@day

#include <Math.au3>
$Date = GUICtrlCreateMonthCal (@YEAR&"/"&@MON&"/"&@MDAY,50, 50,165,140,"",$GUI_DOCKSIZE)
$time = @YEAR&@mon&@day
$compairtime =  _Min($Date , $time)
MsgBox(0,"",$compairtime)
Nice! well I think you should either add "/" to the $time, or revert (@YEAR&"/"&@MON&"/"&@MDAY) to numbers only.

Share this post


Link to post
Share on other sites
erezlevi

Nice! well I think you should either add "/" to the $time, or revert (@YEAR&"/"&@MON&"/"&@MDAY) to numbers only.

you have a mistake! it should be YDAY and not just @day.

Share this post


Link to post
Share on other sites
erezlevi

i already fixed that all and removed the / but the problem is that its return 0 as value i dont get it

here is my answer to you: READ THE HELP FILE!!!!!!!!!!!

here:

Return Value

Success: Returns the lower of the two numbers.

Failure: Returns 0.

@Error: 0 = No error. - 0 no error!

1 = $nNum1 isn't a number.

2 = $nNum2 isn't a number.

Share this post


Link to post
Share on other sites
erezlevi

sorry It should be:

READ THE HELP FILE!

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.