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 |
|
dnf999
Constraint Violating Yak Guru
253 Posts |
Posted - 2007-01-10 : 06:17:54
|
| Hi I am running SP's and wanted to display the time after it has been executed.Please help me incorporate the getdate() function.i.e.Print 'SP_Successfully_executed: ' + getdate()intended result:SP_Successfully_executed: Jan 10 2007 11:18AMI know the above does not work, but let me please let me know of any solutions!Thanks! |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2007-01-10 : 06:21:43
|
You need to use CONVERT function:Print 'SP_Successfully_executed: ' + Convert(varchar(20),getdate()) Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-01-10 : 06:21:44
|
| Print 'SP_Successfully_executed: ' + cast(getdate() as varchar)Peter LarssonHelsingborg, Sweden |
 |
|
|
dnf999
Constraint Violating Yak Guru
253 Posts |
Posted - 2007-01-10 : 06:27:03
|
| Thanks! |
 |
|
|
|
|
|