I have a db of times available on specific days as a template
id clientID staffID fromTime toTime loadDay
1410 1360601732 162 16:45:00 16:59:00 Wed
1409 1360601732 162 16:30:00 16:44:00 Wed
1408 1360601732 162 16:15:00 16:29:00 Wed
1407 1360601732 162 16:00:00 16:14:00 Wed
1406 1360601732 162 15:45:00 15:59:00 Wed
1405 1360601732 162 15:30:00 15:44:00 Wed
1404 1360601732 162 15:15:00 15:29:00 Wed
I need these times inserted into the db as time stamps for any particular month ie every Wed in Feb, times are as above.
cant figure out the way to grab febs date on Wed and add the time ?
Any help would be appreciated
I dont… quite understand what you want.
But here’s some code for getting all the wednesdays in february 2013.
$date = new DateTime("first Wednesday in February 2013");
} while ($date->format('M') == "Feb");
Didn’t explain it well, I have saved a snapshot of seven days of spaces not available, Wednesday is shown above.
I need to paste these times into a timestamp for say the following seven days so the not available is the same for the follwing week,
so I get a time stamp of say Wed 20th Feb + fromTime & Wed 20th Feb + toTime.
So you’ve got a from time and a to time… how are you storing the date in this table? How do you differentiate between days? Wed could mean Wed the 13th or Wed the 20th… what’s the storage mechanism for the current set of data?
Looking at your table above, I cant give you code for +1 week, because… yuo dont know what week the current entry is.