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 ...
... starts at 7, followed by 1 for Monday, 2 for Tuesday, and so on...
How?
The logic behind this would be to take the date of the order, check if the order date is a Sunday, subtract a day, and return ...
... if I click on Tuesday10March, this code will match "10" to the map and determine what index or offset this is from the starting date, which is "2". It can then determine which CSS element to highlight ...
... runs the following deluge script:
// only run if true
if(input.Copy_Monday_to_the_Other_Days)
{
// init
c_Tuesday = Collection();
c_Wednesday = Collection();
c_Thursday = Collection();
...
... 01-Nov-21
// Tuesday 02-Nov-21
Note that Sunday is day 1 of the week. Saturday is day 7 of the week.
Here's the English ordinal bit I used:
m_Ordinals = ;
v_Day3_Ordinal = ifnull(m_Ordinals.get(v_NextDay.toString("d").toLong()),"th"); ...
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 ...
What?
This is a very quick note with the code to determine the English ordinal of a date (eg. "st" of "1st"). So in a date, instead of "Tuesday, 6 November 2018", I could want "Tuesday 6th of November ...
... to the width of the word "Academic".
What I have:
Academic Week Monday Tuesday Wednesday Thursday Friday
---------------- ----------- ----------- ----------- ----------- -----------
1 ...
... and note the dates for Monday, Tuesday, Wednesday, and Thursday:
Note how amusingly Microsoft thinks Wednesdays come before Mondays... but what's wrong with this equation? You can tell me that ...
... - $w_value
AND s.StaffUserID='STRING_TO_REPLACE_PER_ITERATION'
) AS 'Tuesday',
(
SELECT SEC_TO_TIME(SUM(TIME_TO_SEC(s.EstimateTimeFinish)-TIME_TO_SEC(s.DateTimeCreated))) AS SecondsElapsed
FROM ...
... 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) ...
... to adjust this twice a year.
Complicated
Facility works like this, ask it what date it is on Tuesday in Week 52 of the Academic year 2011/2012... It tells you 2012-07-10. Ask it what date it is ...
My setup
Windows XP SP3
MS SQL Server Management Studio 2008
SQL Server 2008 R2
Regional Setting: London BST (British Summer Time)
Tuesday the 11th of October 2011 at 06:00am:
CONVERT(CHAR(19), ...
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.