How do I write a SQL query involving a time stamp?
Results 1 to 2 of 2

Thread: How do I write a SQL query involving a time stamp?

  1. #1
    Junior Member Xarzu's Avatar
    Join Date
    Jan 2008
    Posts
    15

    How do I write a SQL query involving a time stamp?

    How do I write a SQL query involving a time stamp?

    QUOTE_ID is a character string
    CREATE_DTG is a date time type
    RETENTION_LEAD_TRACK is a table

    This sql statement cmf.CommandText = "SELECT QUOTE_ID FROM RETENTION_LEAD_TRACK where CREATE_DTG > '2016 - 04 - 25 18:18:15.2891'"

    throws this error {"Conversion failed when converting date and/or time from character string."}

  2. #2
    Administrator Steve R Jones's Avatar
    Join Date
    Apr 2011
    Location
    USA
    Posts
    261
    DATE - format YYYY-MM-DD
    DATETIME - format: YYYY-MM-DD HH:MI:SS
    SMALLDATETIME - format: YYYY-MM-DD HH:MI:SS

    Looks like you have spaces in the date that shouldn't be there.

Similar Threads

  1. Problem involving wireless
    By JAsoN74185 in forum Wireless Security
    Replies: 22
    Last Post: September 6th, 2004, 03:49 PM
  2. registry key creation time/date stamp?
    By groovicus in forum Computer Forensics
    Replies: 10
    Last Post: November 23rd, 2003, 10:12 PM
  3. odd date/time stamp showing?
    By bpiedlow in forum *nix Security Discussions
    Replies: 0
    Last Post: September 19th, 2003, 06:11 PM
  4. Stamp Out Http
    By E5C4P3 in forum AntiOnline's General Chit Chat
    Replies: 6
    Last Post: March 3rd, 2002, 09:43 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
  •