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 |
mpolaiah
Starting Member
24 Posts |
Posted - 2010-09-29 : 02:28:56
|
Hi alll,i am using sql server 2005,How to add date and time for exampleeeeeemy date file is 2010-09-29 11:53:00and add these file 01:00:00these 2 filed added final i want 2010-09-29 12:53:00please help meeregardspols |
|
Sachin.Nand
2937 Posts |
Posted - 2010-09-29 : 02:35:52
|
declare @dt datetime='2010-09-29 11:53:00'declare @adddt datetime='01:00:00'select @adddt + @dtPBUH |
 |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2010-09-29 : 06:56:28
|
quote: Originally posted by Sachin.Nand declare @dt datetime='2010-09-29 11:53:00'declare @adddt datetime='01:00:00'select @adddt + @dtPBUH
Assignment during declartion is not allowed in versions prior to 2008MadhivananFailing to plan is Planning to fail |
 |
|
Sachin.Nand
2937 Posts |
Posted - 2010-09-29 : 07:00:38
|
Oh yes.I forgot.Here is SQL 2005 waydeclare @dt datetimeset @dt='2010-09-29 11:53:00'declare @adddt datetimeset @adddt='01:00:00'select @adddt + @dt PBUH |
 |
|
|
|
|