Click here to Skip to main content
15,917,059 members
Home / Discussions / Database
   

Database

 
AnswerRe: variation in the output generated Pin
Rami Said Abd Alhalim13-Aug-07 20:24
Rami Said Abd Alhalim13-Aug-07 20:24 
QuestionSQL db table limit Pin
firestoper13-Aug-07 19:18
firestoper13-Aug-07 19:18 
AnswerRe: SQL db table limit Pin
blakey40413-Aug-07 21:52
blakey40413-Aug-07 21:52 
AnswerRe: SQL db table limit Pin
Ronni Marker14-Aug-07 0:17
Ronni Marker14-Aug-07 0:17 
AnswerRe: SQL db table limit Pin
okdeshpande14-Aug-07 2:06
okdeshpande14-Aug-07 2:06 
AnswerRe: SQL db table limit Pin
firestoper14-Aug-07 15:09
firestoper14-Aug-07 15:09 
QuestionDate format problem Pin
Prashant C13-Aug-07 17:47
Prashant C13-Aug-07 17:47 
AnswerRe: Date format problem Pin
Krish - KP13-Aug-07 18:14
Krish - KP13-Aug-07 18:14 
Just copy pasting online help ....


SET DATEFORMAT
Sets the order of the dateparts (month/day/year) for entering datetime or smalldatetime data.

Syntax
SET DATEFORMAT { format | @format_var }

Arguments
format | @format_var

Is the order of the dateparts. Can be either Unicode or DBCS converted to Unicode. Valid parameters include mdy, dmy, ymd, ydm, myd, and dym. The U.S. English default is mdy.

Remarks
This setting is used only in the interpretation of character strings as they are converted to date values. It has no effect on the display of date values.

The setting of SET DATEFORMAT is set at execute or run time and not at parse time.

Permissions
SET DATEFORMAT permissions default to all users.

Examples
This example uses different date formats to handle date strings in different formats.

SET DATEFORMAT mdy
GO
DECLARE @datevar datetime
SET @datevar = '12/31/98'
SELECT @datevar
GO

SET DATEFORMAT ydm
GO
DECLARE @datevar datetime
SET @datevar = '98/31/12'
SELECT @datevar
GO

SET DATEFORMAT ymd
GO
DECLARE @datevar datetime
SET @datevar = '98/12/31'
SELECT @datevar
GO



Regards
KP

QuestionMSSQL output order Pin
mvyjim13-Aug-07 8:12
mvyjim13-Aug-07 8:12 
AnswerRe: MSSQL output order Pin
Giorgi Dalakishvili13-Aug-07 8:24
mentorGiorgi Dalakishvili13-Aug-07 8:24 
GeneralRe: MSSQL output order Pin
mvyjim13-Aug-07 10:56
mvyjim13-Aug-07 10:56 
QuestionDay of week Pin
kibromg13-Aug-07 5:22
kibromg13-Aug-07 5:22 
AnswerRe: Day of week Pin
DerekFL13-Aug-07 5:48
DerekFL13-Aug-07 5:48 
GeneralRe: Day of week Pin
kibromg13-Aug-07 6:32
kibromg13-Aug-07 6:32 
QuestionCLR WebService Access Pin
DerekFL13-Aug-07 5:21
DerekFL13-Aug-07 5:21 
Questionsqlserver2005 [modified] Pin
saravanan0513-Aug-07 1:56
saravanan0513-Aug-07 1:56 
AnswerRe: sqlserver2000 Pin
Pete O'Hanlon13-Aug-07 2:04
mvePete O'Hanlon13-Aug-07 2:04 
QuestionUnexpected existing transaction --> error Pin
Jagadeesh Jupalli12-Aug-07 23:14
Jagadeesh Jupalli12-Aug-07 23:14 
AnswerRe: Unexpected existing transaction --> error Pin
andyharman13-Aug-07 4:29
professionalandyharman13-Aug-07 4:29 
GeneralRe: Unexpected existing transaction --> error Pin
Jagadeesh Jupalli13-Aug-07 8:08
Jagadeesh Jupalli13-Aug-07 8:08 
Questionhow to generate autonumber in ceratin sequence Pin
biswa4712-Aug-07 22:11
biswa4712-Aug-07 22:11 
AnswerRe: how to generate autonumber in ceratin sequence Pin
Blue_Boy12-Aug-07 23:53
Blue_Boy12-Aug-07 23:53 
QuestionIF EXISTS? Pin
Illegal Operation12-Aug-07 21:16
Illegal Operation12-Aug-07 21:16 
AnswerRe: IF EXISTS? Pin
Blue_Boy12-Aug-07 21:29
Blue_Boy12-Aug-07 21:29 
AnswerRe: IF EXISTS? Pin
Pete O'Hanlon12-Aug-07 22:31
mvePete O'Hanlon12-Aug-07 22:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.