T-SQL Calander Question
Weeks within Year: I would build a calendar table with a ISO-8601 week-within-year format column in addition to the usual Common Era date. This format is 'yyyyWww-d' whereyyyy is the year, W is a...
View ArticleT-SQL Calander Question
The FirstDateOfWeek, LastDateOfWeek are controlled by SET DATEFIRST. If you want the first day to be Mon then run:SET DATEFIRST 1;Before populating the table.
View ArticleT-SQL Calander Question
Here is the version of the query with mdy conversion and insert into dbo.Calendar. I strongly suggest that you store datetime form week start and end date and convert to mm/dd/yyyy on presentation...
View ArticleT-SQL Calander Question
In these case the quicker way is to create a calendar in excel and later to import it in SQL. Believe me, easy, sure and above all fast... I thought about that approach, just wasn't sure if the process...
View ArticleT-SQL Calander Question
I would highly suggest you create an actual calendar table. Then you can get that information very easily.Please...
View ArticleT-SQL Calander Question
I would highly suggest you create an actual calendar table. Then you can get that information very easily.Please...
View ArticleT-SQL Calander Question
In these case the quicker way is to create a calendar in excel and later to import it in SQL. Believe me, easy, sure and above all fast...
View ArticleT-SQL Calander Question
How can I get the two dates to show up in MM/DD/YYYY Format?Also, could I perform an INSERT INTO statement so that I can get this data into a table?
View ArticleT-SQL Calander Question
Hi Montoya,Here is a one way to get this result from a query. Important thing is to set DATEFIRST to 1 which sets the datepart function to behave to way you described (e.g. Monday start of week).set...
View ArticleT-SQL Calander Question
I need to create a table that will have 3 fields Week Number -- Begin Date --- End Date. The begin day is Monday, end day is Sunday. There has to be some built in SQL function or a quick way to do...
View Article