Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Data Retrieval

Data Retrieval

Scheduled Pinned Locked Moved Database
helpdatabasequestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mgr_2k7
    wrote on last edited by
    #1

    I have a problem of trying to find the query for finding invalid dates in my table which does not follow the following formats. Given are the valid formats: 1. 10/1/2007 2. Thu Sep 20 06:32:10 GMT-0400 (EDT) 2007 3. 10/1/2007 5:00 Can anybody please help me regarding this? Thanks in advance. :)

    B 1 Reply Last reply
    0
    • M mgr_2k7

      I have a problem of trying to find the query for finding invalid dates in my table which does not follow the following formats. Given are the valid formats: 1. 10/1/2007 2. Thu Sep 20 06:32:10 GMT-0400 (EDT) 2007 3. 10/1/2007 5:00 Can anybody please help me regarding this? Thanks in advance. :)

      B Offline
      B Offline
      Blue_Boy
      wrote on last edited by
      #2

      try this select convert(varchar(10),cast(datevalue as datetime) ,120) from dateformats where convert(varchar(10),cast(datevalue as datetime) ,120) ='2007-10-01' Date Thu Sep 20 06:32:10 GMT-0400 (EDT) 2007 will not work for this query because it will cause convertion error exception.


      I Love T-SQL "Don't torture yourself,let the life to do it for you." If my post helps you kindly save my time by voting my post. www.aktualiteti.com

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups