473,320 Members | 2,112 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Check dates against weekdays

I have a orm built with RSForms Pro in which there is a calendar. The form is about bookings for activities, some of which are not available every weekday. Is there a way of checking the date the clients chooses and display some kind of alert in case the activity he/hse is booking, does not take place in that weekday?
Mar 5 '10 #1
2 2281
zorgi
431 Expert 256MB
Two functions you might find useful:
Mar 5 '10 #2
Atli
5,058 Expert 4TB
Sure. Just take the dates (using the functions zorgi suggested) and compare them with the dates when the activity is available. Show an error if it is not.

If you do:
Expand|Select|Wrap|Line Numbers
  1. $day = date('N', strtotime('2010-03-05'));
You will get the number associated with today's weekday (6 for Friday). - You could just create a list of weekdays in which the activity is available, fetch the weekday the user selected and compare the two.
Mar 5 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Tiernan | last post by:
Hi all I'm looking for a way to find the number of weekdays between 2 dates In my form I have three fields for a begin date (dd)(mm)(yyyy) and three for the end date (dd)(mm)(yyyy) Now these...
4
by: John | last post by:
hey all..... alright, I am frusterated to the point of throwing my machine out the window (this board went down, trying to find stuff on google, this has been a nightmare) so I hope you guys can...
5
by: SimonC | last post by:
Help needed for a Javascript beginner. As above in the subject... i need a javascript to run this, but not in the form of a web-page. I want to calculate it between 2 fields in a database that...
3
by: clwoods | last post by:
Can anyone please help me. I need to count the number of days in the month between 2 dates ie 25/01/03 to 25/06/03 I need to now how many weekdays there was say from January 25 to the end of...
1
by: Chris Hill via .NET 247 | last post by:
Hi I'm a jnr developer in need of desparate help. Can anyone point me in the right direction for this problem: I calculate the number of days between 2 user defined dates like this: Dim...
12
by: Dixie | last post by:
I am trying to calculate the number of workdays between two dates with regards to holidays as well. I have used Arvin Meyer's code on the Access Web, but as I am in Australia and my date format is...
4
by: MLH | last post by:
I'm thinking of an integer field in which I could write values up to 1+2+4+8+16+32+64 and to use these values later. Each of the individual values would represent a weekday from Sunday to Saturday....
6
RamananKalirajan
by: RamananKalirajan | last post by:
Can any one please help me out in calculating the no of weekdays between two givendays using Javascripts I tried in many way but I cant get the solution. The date format I am using is DD-MON-YYYY....
2
by: Mike | last post by:
Is there a way to calculate the total number of weekdays when provided a date? Example: If I have a start date of 7/11/2008 and I want to go out 10 days, I want to get this: 6 weekdays 4...
2
by: vspsdca | last post by:
Hi, I'm quite new to the world of VBA so any help you could extend will help me a lot with my project. I have a database of Change Requests from our users. I have two date boxes, one is Date...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.