 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Matthew Pascoe Guest
|
Posted: Sun Oct 17, 2004 9:29 am Post subject: Return only Date portion of date/time |
|
|
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
|
Posted: Sun Oct 17, 2004 7:19 pm Post subject: Re: Return only Date portion of date/time |
|
|
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
|
Posted: Thu Oct 21, 2004 4:00 am Post subject: Re: Return only Date portion of date/time |
|
|
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( ,GetDate(),1) as DateTime)
--
Brian Bushay (TeamB)
[email]Bbushay (AT) NMPLS (DOT) com[/email]
|
|
|
| Back to top |
|
 |
|
|
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
|
|