SaveText.Ru

qwe123321
  1. SELECT
  2.  CURRENT_TIMESTAMP AS currentdatetime,
  3.  CAST(CURRENT_TIMESTAMP AS DATE) AS currentdate,
  4.  CAST(CURRENT_TIMESTAMP AS TIME) AS currenttime,
  5.  YEAR(CURRENT_TIMESTAMP) AS currentyear,
  6.  MONTH(CURRENT_TIMESTAMP) AS currentmonth,
  7.  DAY(CURRENT_TIMESTAMP) AS currentday,
  8.  DATEPART(week, CURRENT_TIMESTAMP) AS currentweeknumber,
  9.  DATENAME(month, CURRENT_TIMESTAMP) AS currentmonthname

Share with your friends:

Print