Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by Vector01

  1. Vector01

    Convert text field to Datetime

    WIth the 111 style it converted to 'Oct 3 1919'. I tried other styles like 101 on the DOD and I still get convert string errors. UPDATE ad1001 set ad1001.dod = Convert(datetime, Right([DOd],4) + '/' + Left([DOd],2) + '/' + SubString ([DOd],3,2), 111) I'll keep trying. Thanks. Frodo Baggins...
  2. Vector01

    Convert text field to Datetime

    Well I spoke to soon. I changed the date delimiters to a hyphen and the DOD field converts fine with no warning but when I try and change the DOB field which contains dates like where the year is 2000 and 2001 I get an overflow error. Any ideas? :-( Frodo Baggins Middle Earth, Hobbiton
  3. Vector01

    Convert text field to Datetime

    This is the convert string I used and it worked great. UPDATE ad1001 SET ad1001.dod = Right([DOd],4) + '/' + Left([DOd],2) + '/' + SubString ([DOd],3,2) I then changed the field from nvarchar to datetime and although it gave a warning that data may be lost it converted sucessfully. Thanks...
  4. Vector01

    Convert text field to Datetime

    I'm getting this error now: Invalid operator for data type. Operator equals boolean AND, type equals nvarchar. What should I use to identify the '/'? Thanks much
  5. Vector01

    Convert text field to Datetime

    I have a txt field in an SQL table that I nned to convert to datetime but I need to make it in a date format. This is what I have now: 10081918 this is what I need it to be 1918/10/08. I tried using this but MId is not a recognized function. UPDATE ad1001 SET ad1001.dob = Right([DOB],4) &...

Part and Inventory Search

Back
Top