Hello all, I have problem with GetDate() method.When i am creating any new user,in DateTime field Date is coming correctly time is not coming correctly,it should show generate always system date and time.Ex:2/6/2009 12:00:00 AM,2/7/2009 12:00:00 AM,2/8/2009 12:00:00 AM etc. I mean here date is changing but system time is not changing. Here is my code:
CREATE PROCEDURE dbo.NewUser
(
@UserName varchar(50),
@Password varchar(50),
@EmailId varchar(50),
@DateTime Date
)
AS
insert into Login(UserName,Password,EmailId,DateTime)
values(@UserName,@Password,@EmailId,GetDate())
com.Parameters.Add("@DateTime", DateTime.Now.ToShortTimeString());