Jump to content


This topic is now archived and is closed to further replies.


Date Conversion Problem

Recommended Posts

I have 4 text boxes to be filled with date (txtDate1, txtDate2, txtDate3, txtDate4), only txtDate1 need to be filled, the rest will be filled automatically by increment one based on txtDate1.

however, is there any way to check whether the particular date is sunday ? if it is sunday, the date will be skipped and the following date is added.

In this case for example,
1/1/2006 (friday)
2/1/2006 (saturday)
3/1/2006 (sunday)
4/1/2006 (monday)
5/1/2006 (tuesday)

so the 3/1/2006 will be skipped.
so txtDate1 will be 1/1/2006, txtDate2 will be 2/1/2006 , txtDate3 will be 4/1/2006 , txtDate4 will be 5/1/2006 .

thank you so much !

Share this post

Link to post
Share on other sites
$dayNumber=date("w", mktime([int hour [, int minute [, int second [, int month [, int day [, int year [, int is_dst]]]]]]] ))

will give you a number from 0 to 6, with 0 being Sunday. You need to fill in some of the variables in mktime.


Share this post

Link to post
Share on other sites


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.