Search
 
SCRIPT & CODE EXAMPLE
 

SQL

get monday of current week sql

SELECT CURDATE() - INTERVAL WEEKDAY(CURDATE()) DAY AS startweek;
Comment

sql current day of week number

SELECT DAYOFWEEK(NOW());
Comment

Get monday of week date is in SQL

DateAdd(day, (-1* (DatePart(weekday, TIMESTAMP)  % 7)) + 2, TIMESTAMP)
-- If first day is sunday in SQL 
Comment

get week day from date in sql

SELECT TO_CHAR(your_table.date_colunm, 'DAY')
FROM your_table;
Comment

sql server get week dates from week number

SELECT  
	DATEADD(DAY, 2 - DATEPART(WEEKDAY, GETDATE()), CAST(GETDATE() AS DATE)) [Week_Start_Date],  
	DATEADD(DAY, 8 - DATEPART(WEEKDAY, GETDATE()), CAST(GETDATE() AS DATE)) [Week_End_Date] 
Comment

PREVIOUS NEXT
Code Example
Sql :: install sqlite npm 
Sql :: sql alter type of column 
Sql :: 3 days back in sql server 
Sql :: mysql generate uuid 
Sql :: recently updated stored procedure in sql server 
Sql :: alter table id autoincrement 
Sql :: get record which is available in one table but not in another mysql 
Sql :: mysql show all table from database 
Sql :: sql count 
Sql :: ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client vs code 
Sql :: get number of table colums in sql query 
Sql :: sql percentage with % rounded down 
Sql :: group_concat in mysql 
Sql :: postgre sql create table 
Sql :: sql select most frequent value in column 
Sql :: sql count number of rows after group by 
Sql :: how to check table lock 
Sql :: current timestamp in milliseconds mysql 
Sql :: copy value from one column to another postgres 
Sql :: linq join 
Sql :: python sqlite data delete 
Sql :: mysql select default if null 
Sql :: sql command to show all tables 
Sql :: mssql dockere 
Sql :: launch sql script from docker in mysql 
Sql :: sql between 
Sql :: reset auto increment mysql 
Sql :: reindexing all tables sql server 
Sql :: get cpu details sql 
Sql :: postgres update single column 
ADD CONTENT
Topic
Content
Source link
Name
1+1 =