What?
A very quick article with a snippet of code to get today's date, tomorrow's, and the day after's but it has to skip Sundays.
Why?
Wanting to create a schedule for availability over the next ...
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 ...
... Start Starts Second Sunday in March at 2:00
DST End Ends First Sunday in November at 2:00
//
// Starts Second Sunday in March at 2:00
v_FirstMonthDate = toTime(zoho.currentdate.toString("yyyy") ...
... 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 = ...
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 ...
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 ...
Some more distractions. This is my filming of some Radio Controlled cars at the Torch Racing, UK event last Sunday. The FPV latency isn't good on this camera so it was no use here, so several challenges: ...
... Sunday 03:00 04:00 - - 4:00 41:45
Some Requirements;
StartTime will be the earliest someone starts work that day.
EndTime will be the latest someone works that ...
... do not account for days off (eg. Saturday / Sunday)
How?
Adapted from a forum topic: SQLTeam Forums
First of all, we want the rows to multiply based on the value of the column:
SELECT
...
... StaffActivities s
WHERE WEEKDAY(s.DateTimeCreated)=6
AND YEARWEEK(s.DateTimeCreated)=YEARWEEK(NOW()) - $w_value
AND s.StaffUserID='STRING_TO_REPLACE_PER_ITERATION'
) AS 'Sunday',
(
SELECT ...
...
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 ...
Why?
I recently made a joomla module that displays the lastest members to signup. It goes a little further and counts activated accounts for the past day, week, month and year (the below examples count ...
... 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) ...
...
day of the month (dd)
4
%j
day of year, zero padded
001-366
%u
day of week starting with Monday (1), i.e. mtwtfss
1
%w
day of week starting with Sunday (0), ...
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.