-
Can I change the format in which Sql Server stores dates?
Can I change the way that sql Server stores the dates for a single table's date column ?
the usual format is mm/dd/yyyy but I want it to store it like : yyyy/mm/dd . Is this possible ?
-
SQL Server does not store dates in a particular format. Why do you ask?
Phil Weber
http://www.philweber.com
Please post questions to the forums, where others may benefit.
I do not offer free assistance by e-mail. Thank you!
-
 Originally Posted by Phil Weber
SQL Server does not store dates in a particular format. Why do you ask?
well its displaying the dates like : mm/dd/yyyy in the table, I want it to display the date as yyyy/mm/dd because the data has to be inserted to another table to create a csv file that has to have the date in that format because the csv file is going to get FTP'd and uploaded to an ORACLE db . (And no I cant just use dts because we cannot obtain permission to directly connect to the Oracle DB .
Last edited by Matrix.net; 02-22-2007 at 09:11 AM.
-
If you're using .NET code to insert the data into the Oracle database, you may do something like this to format the date as desired:
' dr is a SqlDataReader
Dim DateValue As DateTime = dr.GetDateTime(ColNum)
Dim NewFormat As String = DateValue.ToString(Format)
Phil Weber
http://www.philweber.com
Please post questions to the forums, where others may benefit.
I do not offer free assistance by e-mail. Thank you!
Similar Threads
-
By Luke in forum Database
Replies: 4
Last Post: 05-29-2001, 07:03 PM
-
By Nate in forum Database
Replies: 29
Last Post: 05-09-2001, 10:04 AM
-
By David Hay in forum Database
Replies: 2
Last Post: 04-02-2001, 07:11 PM
-
By myLittleTools.net in forum web.announcements
Replies: 0
Last Post: 03-10-2001, 12:35 PM
-
By Devaraj in forum Enterprise
Replies: 0
Last Post: 05-11-2000, 12:48 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks