473,398 Members | 2,165 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,398 software developers and data experts.

Meeting Schedulars

245 100+
Hi,
i am a new bee here and hope to have some replies from your end. I am working on a project that has to assign the time slaps for meeting any particular member.the logic behind it is that the members will have to give a starting time and ending time and the duration for the meeting , means if i am a working in a office and someone has to arrange a meeting with me lets say i have the starting and ending time from 9:00am to 3:00pm and the duration of each meeting is 30 minutes then i have to show an equal time intervals in this case it would be
9:00am ~9:30am
9:30am~10:00am
10:00am~10:30am
10:30am~11:00am
11:00am~11:30am
and up to 3:pm respectively
can any one have any idea about how should i be calculating the time intervals for example if i have start time 9:00, end time 12:00 and time interval say suppose if i entered 30 then it will make time slabs for me like

9:00am ~9:30am
9:30am~10:00am
10:00am~10:30am
10:30am~11:00am
11:00am~11:30am
11:30am~12:00am

Best regards,
Mohsin Rafique
Aug 21 '08 #1
3 1425
nathj
938 Expert 512MB
Hi,

You are going to need a loop from the start time to the end time and increment variable. Inside the loop you set another variable to give you the time slot you require.

You'll need to look at the date and time functions in php to get this sorted properly.

Expand|Select|Wrap|Line Numbers
  1. // Psuedo code
  2. $ltStart = 9
  3. $ltEnd = 12
  4. $lnIncrement = 0.5
  5. for($ltStart=9; $ltStart<=$ltEnd; $ltStart + $lnIncrement)
  6. {
  7. $lcTimeSlot =$ltStart . '-' . $ltStart + $lnIncrement ;
  8. echo $lcTimeSlot . '<br />'
  9. }
  10.  
This is just a code sketch, but I think it's heading in the right direction.
Cheers
nathj
Aug 21 '08 #2
neovantage
245 100+
Hello,
Thank you very much for resolving my problem. If i will have any further problem regarding to this then i am sure you will not hesitate to solve my problems. Thanks a lot again

Best regards,
Mohsin Rafique

Hi,

You are going to need a loop from the start time to the end time and increment variable. Inside the loop you set another variable to give you the time slot you require.

You'll need to look at the date and time functions in php to get this sorted properly.

[PHP]
// Psuedo code
$ltStart = 9
$ltEnd = 12
$lnIncrement = 0.5
for($ltStart=9; $ltStart<=$ltEnd; $ltStart + $lnIncrement)
{
$lcTimeSlot =$ltStart . '-' . $ltStart + $lnIncrement ;
echo $lcTimeSlot . '<br />'
}
[/PHP]
This is just a code sketch, but I think it's heading in the right direction.
Cheers
nathj
Aug 22 '08 #3
nathj
938 Expert 512MB
Hello,
Thank you very much for resolving my problem. If i will have any further problem regarding to this then i am sure you will not hesitate to solve my problems. Thanks a lot again

Best regards,
Mohsin Rafique
I'm happy to have helped out. If you get stuck simply post back and either myself or another member will be sure to help out.

Cheers
nathj
Aug 22 '08 #4

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

Similar topics

0
by: Aahz | last post by:
NOTE: we are no longer meeting at Stanford; the May meeting is at Google in Mountain View. The next meeting of BayPIGgies will be Thurs, May 19 at 7:30pm. NOTE: to celebrate our first...
0
by: Betty Harvey | last post by:
The next meeting of the XML Users Group will be held on Wednesday, September 17, 2003 at the American Geophysical Union (AGU) at 2000 Florida Avenue, N.W., Washington, DC 20009-1277. The meeting...
0
by: Betty Harvey | last post by:
The next meeting of the XML Users Group will be held on Wednesday, October 15, 2003 at the American Geophysical Union (AGU) at 2000 Florida Avenue, N.W., Washington, DC 20009-1277. The meeting...
0
by: Betty Harvey | last post by:
The next meeting of the XML Users Group will be held on Wednesday, November 19, 2003 at the American Geophysical Union (AGU) at 2000 Florida Avenue, N.W., Washington, DC 20009-1277. The meeting...
0
by: Betty Harvey | last post by:
The next meeting of the XML Users Group will be held on Wednesday, February 18, 2004 at the American Geophysical Union (AGU) at 2000 Florida Avenue, N.W., Washington, DC 20009-1277. The meeting...
0
by: Betty Harvey | last post by:
The next meeting of the XML Users Group will be held on Wednesday, August 18, 2004 at the American Geophysical Union (AGU) at 2000 Florida Avenue, N.W., Washington, DC 20009-1277. The meeting...
0
by: Brian Loesgen | last post by:
The next San Diego .Net User Group meeting is Tuesday, November 25, 2003 at the Scripps Ranch Library. Scripps Ranch Library 10301 Scripps Lake Drive San Diego, CA 92131-1026 Please join us...
0
by: Betty Harvey | last post by:
The next meeting of the XML Users Group will be held on Wednesday, April 19, 2006 at the American Geophysical Union (AGU) at 2000 Florida Avenue, N.W., Washington, DC 20009-1277. The meeting starts...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.