Re: IsWeekend() or IsWeekday()



"Steve Gerrard" <mynamehere@xxxxxxxxxxx> wrote in message
news:B5Odna0DspaD4jreRVn-pQ@xxxxxxxxxxxxxx
>
> "Rick Ratchford" <nospam@xxxxxxxxxxxxxx> wrote in message
> news:6fKpf.29660$QW2.21312@xxxxxxxxxxxxx
>> Are you saying that using the Date type takes care of the problem I'm
>> describing? How?
>>
>> Inquiring minds want to know.
>>
>> :-)
>>
>>
>> "Steve Gerrard" <mynamehere@xxxxxxxxxxx> wrote in message
>> news:2LudnTWtie1JwzreRVn-oA@xxxxxxxxxxxxxx
>>> Hey, didn't you ask in another thread, on the subject of
>>> dates-as-strings, something like:
>>> "But what kind of trouble could I be asking for? It seems to work
>>> fine..."
>>>
>>> Seems to me you know more about what kind of trouble than you are
>>> letting on...:)
>>>
>>>
>>
>>
>
> Actually, I meant to point out that perhaps the other programmer thought
> the same thing: what harm is there in exporting my dates as strings? It
> seems to work fine...
>
> I'm not saying that a date type can automagically fix dates-as-strings
> problems. I am saying that date types can avoid creating more
> dates-as-strings problems.

I was the other programmer...
I too work with a lot of cases like this, where I need to import/parse text
data
files. And that is actually one of the things that led me to avoid using the
date
data type except when absolutely neccessary.

I need to be *absolutely* certain that I got the correct date, so I can't
trust
vb to interpret 11/11/01, or any other variation. I _must_ know.

"Dates as strings" in my experience causes much less trouble, as long as you
always format them as ISO dates: http://www.w3.org/QA/Tips/iso-date.

But to the OP's problem: What I do in situations when I need to read such
files
is that I either trust the system national settings (ie. ask the NLS for the
date-separator and date format), or have an [import format] section in my
apps
config-file, where the user can override the date mask to use when
importing.

No need to worry about me using strings internally Steve. Your example in
another
thread (Format$(CDate("2005-12-20"), "yyyymmdd")) is absolutely correct. I
*do*
take a performance penalty because of the implicit CDate(dte). But I sleep
better
at night, because I _know_ that dte is always in the unambigious ISO format
that
can't be misinterpreted.

Just one of my quirks... :-)

--
Dag.


.



Relevant Pages

  • Re: Passing 70-215
    ... You're saying the format made you fail?? ... If you know the answer to a question, it doesn't matter how it's ... > get paid, that's 90% ...
    (microsoft.public.cert.exam.mcse)
  • Re: using "!!" in "c"
    ... > that Keith was". ... >> egyptian hieroglyphics is kinda like saying that there is a remote ... > and portable code cannot depend on any particular output format. ...
    (comp.lang.c)
  • Re: A HELP BOX
    ... I'm not sure what you are saying. ... Cancel argument to False so they can't exit until the format is correct. ... Is there a way that when I’m in the name textbox ... name, CtrlTab twice, your Middle Initial, CtrlTab once, Last Name” ...
    (microsoft.public.word.vba.general)
  • Re: New Quads
    ... me under a different name, asked for my opinion, buy a ... Here's a friendly tip Harry - google on Grado and Rega. ... Are you saying that the LP format isn't about 50 years old? ...
    (rec.audio.opinion)
  • Re: Convert MDB to ADP
    ... What I would suggest, then, is to use a dynamic record source for your form. ... > strings rptCtry() ... Is it possibel to find any function in SQL server to replace Format, ...
    (microsoft.public.access.adp.sqlserver)