Archivi tag: SQL

TSQL get records of last week

Today I’ve received this request: realyze a stored proc that return all records from monday of the previus week to today. So If we run this stored proc on monday we will get the last 7 days but if we … Continua a leggere

Pubblicato in SQL | Contrassegnato , , | Lascia un commento

SQL Convert nvarchar to DateTime

Many times I need to convert a date stored in a nvarchar column with this format dd/MM/yyyy will generate error because it will expect the date in atomic format 1985-05-17 an easy way to convert it is this this work … Continua a leggere

Pubblicato in SQL | Contrassegnato , , , | Lascia un commento