Conditional formatting for date

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want the background color to be yellow when the entry date is not in the
format MMM-DD-YYYY. What is the expression for it? Thanks.
 
I want the background color to be yellow when the entry date is not in the
format MMM-DD-YYYY. What is the expression for it? Thanks.

Um...?

A Date/Time value isn't stored with *any* format. It's stored as a number, a
count of days and fractions of a day from an arbitrary start point. You can
have the same date formatted a dozen different ways in your database if you
want.

What exactly are you trying to accomplish? Control what your users type, or
what? Where is the "entry date" coming from?

John W. Vinson [MVP]
 
Actually, I'm pasting 4 different contract dates from result of an inquiry
screen (Oracle ERP). The date format from the inquiry screen is mm-dd-yyyy.
I want to put a conditional format so I don't forget to change it to
mmm-dd-yyyy. We then upload the scrubbed data set to Oracle.
 
Actually, I'm pasting 4 different contract dates from result of an inquiry
screen (Oracle ERP). The date format from the inquiry screen is mm-dd-yyyy.
I want to put a conditional format so I don't forget to change it to
mmm-dd-yyyy. We then upload the scrubbed data set to Oracle.

What is the Datatype of the contract date in your table?

Again: A Date field in Access does NOT contain any text. It is *not* stored as
mmm-dd-yyyy; it is *not* stored as mm-dd-yyyy; you *cannot* use conditional
formatting to change the color if it's stored one way or the other, because it
ISN'T stored either way! Today - Date() - is stored internally as
39322.000000000. If you store it in a date/time field (no matter what format
is used for importing or typing it), you can export to Oracle by using the
Format() function to cast it into a text string in mmm-dd-yyyy (or any other
desired) format.

John W. Vinson [MVP]
 
All the field datatype are text on this table I'm scrubbing.

Sorry, my telepathy wasn't working.

Try using an Expression:

DATE Like "[A-Z][A-Z][A-Z]-##-####"

and setting the color based on this statement's truth or falsity.

John W. Vinson [MVP]
 
Back
Top