Skip to navigation
Mssql get the beginning of this month with mssql and convert to 112 format
10.11.17
select CONVERT(VARCHAR(8),DATEADD(mm, DATEDIFF(mm, 0, GETDATE()), 0),112) as from_date
http://zarez.net/?p=2462
Reply
Anonymous
Convert from string back to a date object ```tsql SELECT DAY(EOMONTH(GETDATE())) DECLARE @year varchar SET @year = '2024' DECLARE @month varchar SET @month = '08' SELECT DAY(EOMONTH(convert(datetime, CONCAT(@year,@month,'01'), 112))) SELECT convert(datetime, '20240915', 112) ```
10.11.17
Reply
Anonymous
convert to USA11 date CONVERT(varchar(12),convert(datetime, t.yz2_date, 112),11) as [date]
10.11.17
Reply
Anonymous
Convert to ansi3 from 112 3 = dd/mm/yy ,CONVERT(varchar(12),convert(datetime, t.yz2_date, 112),3) as [date]
10.11.17
Reply
Anonymous
Information Epoch 1746047567
Looking for the ninety percent solution.
Home
Notebook
Contact us