Inserting Weekend Dates In A Day Table
When you need to insert weekend dates for the next 10 years in a Day table.
In Microsoft Excel, to extract weekend dates use the formula =WORKDAY.INTL(A1,1,"1111100").
-
Follow the tutorial video.
-
To build the insert query, use CONCAT in Microsoft Excel:
="INSERT INTO DAY (InstanceID, Date) VALUES(273,'" &CONCAT(TEXT(B3,"YYYY-MM-DD"))&"');"
-
Copy and run all the insert queries in the database.