Computing.Net > Forums > Programming > getdate() in SQL w/out time

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

getdate() in SQL w/out time

Reply to Message Icon

Name: Andy
Date: June 5, 2003 at 11:22:37 Pacific
OS: Win 2k
CPU/Ram: gig
Comment:

Is there a way to run the getdate() function in SQL and omit the time part of it? I just want the date as 06/05/2003.

Thanks



Sponsored Link
Ads by Google

Response Number 1
Name: gpp
Date: June 5, 2003 at 11:45:06 Pacific
Reply:

Its something like this..

SELECT CONVERT(char(10), GETDATE(), 101)


0

Response Number 2
Name: abolk
Date: June 5, 2003 at 12:05:18 Pacific
Reply:

Is there a way of doing this without having to convert it to a char? I would like to keep it in a date format. I'm trying to set a default value for a column in a table to be equal to the current date.


0

Response Number 3
Name: gpp
Date: June 6, 2003 at 05:14:50 Pacific
Reply:

What language are you using? Maybe you can parse it out that way..


0

Response Number 4
Name: Andy
Date: June 6, 2003 at 06:06:20 Pacific
Reply:

I am dumping information into a table with DTS. I want the date field to show the date and not the time, as I am comparing it to data in another table that just shows the date.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: getdate() in SQL w/out time

Formatting getdate() in SQL www.computing.net/answers/programming/formatting-getdate-in-sql/6649.html

Duplicate rows in SQL Joins www.computing.net/answers/programming/duplicate-rows-in-sql-joins/12430.html

Store Procedure in Sql ..? www.computing.net/answers/programming/store-procedure-in-sql-/9409.html