Converting DateTime to ShortDate in SQL 4:04 AM Posted by Unknown asp.net, sql No comments When you need to get datetime field value in short date, use the following:To get today's date in YYYYMMDD format: SELECT CONVERT(CHAR(8), GETDATE(), 112)To get today's date in mm/dd/yyyy:CONVERT(VARCHAR(10), GETDATE(), 101)Helpful Link Email ThisBlogThis!Share to XShare to Facebook
0 comments:
Post a Comment