Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2003
    Posts
    114

    Unanswered: Converting varchar to datetime

    I have a sql server 2000 db that has a carchar field that is currently storying date data in the following format:

    June 16

    Can I convert that from varchar to datetime or smalldatetime without loss of data? And, if so, what adjustments do I have to make in my ado code to continue to allow my clients to add data. Currently they add date data by selecting a month from one dropdown and the day from another.

    Thanks!

  2. #2
    Join Date
    Aug 2002
    Location
    Scotland
    Posts
    1,578
    Create another column and use CONVERT function to conver the date and store. Then delete the old column.
    --Satya SKJ
    Microsoft SQL Server MVP
    [IMG]http://sqlserver-qa.net/google_bart.gif[/IMG]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •