Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2000 > SQL Server 2000
|
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 12th, 2004, 01:45 AM
Authorized User
 
Join Date: Jul 2004
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default Problem about DateANdTime field in MSDE

Hi
           When I insert a record into a table DateTime Field with GETDATE() .It will display both Date and Time data.How can I insert only the Date or Time Portion ? If I want to insert the current time into the time field what function in MSDE can I use?
                                                                            Thank
                                                                                   doctorsom

 
Old October 12th, 2004, 12:10 PM
sal sal is offline
Friend of Wrox
 
Join Date: Oct 2003
Posts: 702
Thanks: 0
Thanked 0 Times in 0 Posts
Default

There is no time data type in MSDE or SQL Server.

Try this to get only the time:

select convert(varchar(8),getdate(), 108)

look up convert in books on line.



Sal





Similar Threads
Thread Thread Starter Forum Replies Last Post
sql server connection problem in msde oldbig89 SQL Server 2000 1 February 8th, 2006 05:46 PM
having problem installing SQL/MSDE kenh BOOK: Beginning ASP 3.0 0 March 30th, 2005 10:12 PM
MSDE Problem Barath BOOK: ASP.NET Website Programming Problem-Design-Solution 8 December 2nd, 2004 11:40 PM
MSDE connection problem (Newbie) rahzan SQL Server 2000 2 June 29th, 2004 08:32 AM
Big problem with VB + MSDE 7 predal Pro VB 6 2 April 2nd, 2004 03:44 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.