What?
A quick article on determining the week number of the year if your week starts on a Monday and not a Sunday.
Why?
I think it's the US system which generally says that a week starts on a Sunday ...
What?
An article on setting a date field to either the first Monday of the next month or to the last Tuesday of the current/next month. What I mean by the last Tuesday is if the last Tuesday of the ...
... sunday but we want to start counting from Monday 00:00
v_FirstDateOfWeek = zoho.currentdate.toStartOfWeek().addDay(1).toString("yyyy-MM-dd");
//
// build up COQL Query
v_CoqlQuery = ...
... in a subform called "Mondays" then to click a button which copies it to the remaining working days.
How?
So I have a form with 6 subforms which list staff/employee shifts from Monday to Saturday. ...
... is 17 minutes and 5 seconds ago
// then $v_Str = "17 minutes ago"
Or how about
$v_Str = getTimeAgo('-1 week 2 days 4 hours 2 seconds');
// yields "1 week ago"
$v_Str = getTimeAgo('last Monday');
// ...
What?
This is a very quick note with the code to retrieve the full day name from a date (eg. "Monday").
Why?
If I use the toString() function to get the day, it only returns the first 3 letters ...
... to the width of the word "Academic".
What I have:
Academic Week Monday Tuesday Wednesday Thursday Friday
---------------- ----------- ----------- ----------- ----------- -----------
1 ...
... column) and the days of the week along the top.
Why?
The excel report would hit a bug where it couldn't work out that 10 (Wednesday) happened after 8 (Monday).
How?
See the following screenshot ...
... AS 'Monday',
(
SELECT SEC_TO_TIME(SUM(TIME_TO_SEC(s.EstimateTimeFinish)-TIME_TO_SEC(s.DateTimeCreated))) AS SecondsElapsed
FROM StaffActivities s
WHERE WEEKDAY(s.DateTimeCreated)=1
AND YEARWEEK(s.DateTimeCreated)=YEARWEEK(NOW()) ...
...
Why?
Problems with MySQL weeks always starting on Sunday means this isn't very useful. I have another system which starts on Monday and ends on the following Sunday. The solution below is for the ...
... row lists the day, date, room name, start/finish times, booking details and the staff contact. I want an empty row to appear between each day in the list, so I have:
Monday 03/10/2011 Main ...
... WEEKDAY(s.DateTimeCreated) WHEN 0 THEN 'Monday' WHEN 1 THEN 'Tuesday' WHEN 2 THEN 'Wednesday' WHEN 3 THEN 'Thursday' WHEN 4 THEN 'Friday' WHEN 5 THEN 'Saturday' ELSE 'Sunday' END AS ActivityDay,
DATE(s.DateTimeCreated) ...
We use cookies to improve your experience on our website. By browsing this website, you agree to our use of cookies. Read more about our Privacy Policy.