Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
bilencekic
Posting Yak Master
121 Posts |
Posted - 2005-12-17 : 08:12:22
|
i have a column typed datetimei will use that section for registration.on varchar type year is inserted correctly like 01.03.1999but when taht column is datetime the year section which is 1999 here is always inserted as 2001why that?on code section it must enter like 01.03.1999 but it enters like 01.03.1999year and month is always true but year is always inserted as 2001on datetime it enters 2001 but on varchar there is no problemwhy that peoblem occured on datetime?MS BLESS US |
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2005-12-17 : 08:35:36
|
post your table structure, code and sample data-----------------[KH]Learn something new everyday |
|
|
bilencekic
Posting Yak Master
121 Posts |
Posted - 2005-12-17 : 08:43:23
|
CREATE TABLE [dbo].[Oyuncular] ( [ID] [int] IDENTITY (1, 1) NOT NULL , [KullaniciAdi] [varchar] (50) COLLATE Turkish_CI_AS NULL , [Sifre] [varchar] (50) COLLATE Turkish_CI_AS NULL , [Adi] [varchar] (50) COLLATE Turkish_CI_AS NULL , [Soyadi] [varchar] (50) COLLATE Turkish_CI_AS NULL , [Cinsiyet] [char] (1) COLLATE Turkish_CI_AS NULL , [Email] [varchar] (50) COLLATE Turkish_CI_AS NULL , [DogumTarihi] [datetime] (8) COLLATE Turkish_CI_AS NULL , <<<<<<<<<<<<< this column [OnayKodu] [varchar] (100) COLLATE Turkish_CI_AS NULL , [Onay] [char] (1) COLLATE Turkish_CI_AS NULL , [Durum] [char] (1) COLLATE Turkish_CI_AS NULL , [GirisTarihi] [datetime] NULL , [SonZiyaretTarihi] [datetime] NULL , [YiyecekGeliri] [smallint] NULL , [OdunGeliri] [int] NULL , [DemirGeliri] [int] NULL , [Krallik] [char] (2) COLLATE Turkish_CI_AS NULL , [IPAdres] [varchar] (50) COLLATE Turkish_CI_AS NULL ) ON [PRIMARY]GO-----on .net 2003 sectioncode is like this(there is a function and that is the paramater for this column)ddl = drop down listMe.ddldays.SelectedItem.Text & "." & Me.ddlmonths.SelectedValue & "." & Me.ddlyears.SelectedValuewtih response.write (me.ddlyears.selectedvalue) i get the true result but it instert 1925 as 2001 and all dates as 2001.edit: i fixed problemon stored procecdure i set the format as char(8) but i dont think that is a reson for "2001".but i fixed :Dthxwhen i was trring to send what you want i saw my fault.ehe thxMS BLESS US |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2005-12-17 : 08:46:36
|
Good to hear that -----------------[KH]Learn something new everyday |
|
|
|
|
|
|
|