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.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Display date and time in a query

Author  Topic 

fvinagre
Starting Member

29 Posts

Posted - 2004-10-14 : 08:31:33
Hi Dbas,

This is a Very easy question.
How i can show the current date and current time in a query?
Exist any variable such @@verion to see it?

Regards
Fernando

Seventhnight
Master Smack Fu Yak Hacker

2878 Posts

Posted - 2004-10-14 : 08:38:34
getdate()

is that what you want?

select getdate()

Corey
Go to Top of Page

fvinagre
Starting Member

29 Posts

Posted - 2004-10-14 : 08:42:14
getdate() is useful bu I only want get date no the time
Go to Top of Page

Seventhnight
Master Smack Fu Yak Hacker

2878 Posts

Posted - 2004-10-14 : 08:44:36
select convert(varchar,getdate(),101)

Select convert(varchar,getdate(),114)

Corey
Go to Top of Page
   

- Advertisement -