Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to check a field for errored date format?

Posted on 2011-03-03
3
Medium Priority
?
271 Views
Last Modified: 2012-06-27
I have a query that convert a string to a date format, how can i filter it to show only data that is not a correct date format. Normally the field shows #Error.
0
Comment
Question by:tvae
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 15

Accepted Solution

by:
derekkromm earned 500 total points
ID: 35028307
select * from table where isdate(field)=false
0
 

Author Comment

by:tvae
ID: 35028480
derekkrom,

I have tried this one

IsDate(CDate(Left(Right([FOB_POINT],8),2) & "/" & Mid(Right([FOB_POINT],8),3,2) & "/" & Right(Right([FOB_POINT],8),4))) = False

And it gives me too complex error
0
 

Author Comment

by:tvae
ID: 35028537
Disregard the above. I got it to work when i took the cdate

IsDate((Left(Right([FOB_POINT],8),2) & "/" & Mid(Right([FOB_POINT],8),3,2) & "/" & Right(Right([FOB_POINT],8),4))) = False
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question