@@DATEFIRST

Started by sukishan, Aug 19, 2009, 01:34 AM

previous topic - next topic
Go Down

sukishan

@@DATEFIRST
  Topic last updated -- July 2003

Returns the current value of the SET DATEFIRST parameter, which indicates the specified first day of each week: 1 for Monday, 3 for Wednesday, and so on through 7 for Sunday.

Syntax
@@DATEFIRST

Return Types
tinyint

Remarks
The U.S. English default is 7, Sunday.

Examples
This example sets the first day of the week to 5 (Friday), and assumes the current day, today, to be Saturday. The SELECT statement returns the DATEFIRST value and the number of the current day of the week.

SET DATEFIRST 5
SELECT @@DATEFIRST AS '1st Day', DATEPART(dw, GETDATE()) AS 'Today'
Here is the result set.

1st Day           Today
----------------  --------------
5                 2
A good beginning makes a good ending

dhoni

the syntax is datefirst in this sql server

it has small program to get datefirst

and sample program has also given to know easily

Go Up
 

Quick Reply

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Note: this post will not display until it's been approved by a moderator.
Name:
Email:
Verification:
Please leave this box empty:

Type the letters shown in the picture
Listen to the letters / Request another image

Type the letters shown in the picture:

shortcuts: alt+s submit/post or alt+p preview
IT Acumens Web Designing Chennai | GinGly :: Build your Personal Website | CineBuzz :: Cinema News | My Kids Diary :: Kids Memories Writing :: Book Website @ 349 Rs monthly
Copyright 2005 - 2020 :: IT Acumens :: All Rights Reserved. :: Sitemap
ITAcumens Discussion Forum with 2 lakhs post running for 15 years - Powered by IT Acumens Dedicated Server