Results 1 to 3 of 3

Thread: SOLVED: Converting string to datetime in SQL Server

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member JMvVliet's Avatar
    Join Date
    May 2001
    Location
    Papendrecht, Netherlands
    Posts
    310

    Angry SOLVED: Converting string to datetime in SQL Server

    I try to do this:
    Code:
    rs.open "INSERT INTO tblY (dt) VALUES(CONVERT(DateTime, '190504072400'))", cn, and so on
    However, this won't work. Also trying to insert the same, but then formatted ("19-05-04 07:24:00 ") in the same query won't work. When I use GETDATE() (an sql server function), the date is inserted in the format I've set in red. Why can't I do that manually?

    Anyone? Thanx...
    Last edited by JMvVliet; Jun 21st, 2004 at 01:31 AM.

Posting Permissions

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



Click Here to Expand Forum to Full Width