Click here to Skip to main content
15,868,016 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
while inserting into another tables from table1 give the column as 1st JAn2014
Posted

To get the first date

SQL
SELECT DATEADD(month, DATEDIFF(month, 0, GETDATE()), 0) AS FirstDate
 
Share this answer
 
SELECT DATEADD(DAY,DATEPART(DAY,GETDATE()),GETDATE())

is also work
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900