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 23rd, 2004, 11:56 AM
Authorized User
 
Join Date: Sep 2004
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to ctranjith
Default Seperating Date part from a datetime field

Sir
   How can I seperate date part(only date) field contain both date and time using sql server query
is there is any way like cast or convert is there to do that
i can do it by using datepart function but I did't think is so speedy Iam searching for seperate function for that

Can U help me

 
Old October 23rd, 2004, 04:16 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 625
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to jemacc
Default

you can use convert
Code:
select convert(varchar (10),getdate(),101)

Jaime E. Maccou
Applications Analyst
 
Old October 25th, 2004, 06:42 AM
Authorized User
 
Join Date: Sep 2004
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to ctranjith
Default

thank U






Similar Threads
Thread Thread Starter Forum Replies Last Post
Need ONLY date in datetime field in Database Lucy SQL Server 2000 10 April 30th, 2007 09:20 AM
Compare only the date portion of a datetime field CricketMaster Access 6 April 27th, 2005 01:06 AM
Getting Date part out of Datetime in Stored Pr pavel SQL Server 2000 3 February 18th, 2004 04:26 PM
Index Part of Field owain Access 4 October 2nd, 2003 09:34 AM
Index Part of Field owain SQL Language 3 September 29th, 2003 09:37 AM





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