BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Return only Date portion of date/time

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (SQL Servers)
View previous topic :: View next topic  
Author Message
Matthew Pascoe
Guest





PostPosted: Sun Oct 17, 2004 9:29 am    Post subject: Return only Date portion of date/time Reply with quote



I am using SQL Server 2000. I would like to find a function like Getdate(),
but that only returns the date portion, not the time.

Thanks in advance for any help.

Matthew


Back to top
Oscar Santiesteban Jr.
Guest





PostPosted: Sun Oct 17, 2004 7:19 pm    Post subject: Re: Return only Date portion of date/time Reply with quote



How about giving this a try:

select convert(varchar(10),getdate(),101)

It works on my end.

oscar...


"Matthew Pascoe" <mpascoe (AT) stocklogix (DOT) com.au> wrote

Quote:
I am using SQL Server 2000. I would like to find a function like
Getdate(),
but that only returns the date portion, not the time.

Thanks in advance for any help.

Matthew





Back to top
Matthew Pascoe
Guest





PostPosted: Thu Oct 21, 2004 4:00 am    Post subject: Re: Return only Date portion of date/time Reply with quote



Brian,

Once again, I thank you.

Matthew
"Brian Bushay TeamB" <BBushay (AT) Nmpls (DOT) com> wrote

Quote:

I am using SQL Server 2000. I would like to find a function like
Getdate(),
but that only returns the date portion, not the time.

Select Cast(Convert(varchar(Cool,GetDate(),1) as DateTime)
--
Brian Bushay (TeamB)
[email]Bbushay (AT) NMPLS (DOT) com[/email]



Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (SQL Servers) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.