Re: vb6 question
- From: Rick <Rick@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 3 Apr 2008 09:16:00 -0700
Well it's not easy, but may be I can write several functions and make a
whole bunch of replacements in the app.
This is my bet: DateSerial (a Vb6 function)
What do you think?
--
Thanks,
Rick.
"For every problem, there is a solution that is simple, neat, and wrong."
H. L. Mencken"
"dpb" wrote:
christery@xxxxxxxxx wrote:.
On 2 Apr, 18:38, dpb <n...@xxxxxxx> wrote:....
Rick wrote:
Is there any way to make the following date functions:...
Format
CDATE
DateAdd
DatePart
Month
Day
...etc...
system date independent?
In short, no, I don't believe there's any possibility to change the VB
runtime behavior to make it insensitive to system locale. Your best bet
is to replace the intrinsics w/ your own library functions which are
"app-aware" of local locale.
--
Welll, Excel for example is used to this... why not do like excel?
seconds(?) since 1900-01-01 or something, we use 1980-01-01 for our
origin of time in a DB to get rid of that summertime problem, (got
otherones instead but...)
Decent answer to the wrong question I think...that doesn't handle (at
least that I see) the question of interpretation in the VB functions of
a text-formatted date in mm/dd/yy order vis a vis dd/mm/yy order--VB
will still interpret it on the basis of the global locale setting.
What Rick wants/needs is a way to control that behavior for a single app
independent of the system setting and there's no facility in VB to
handle it.
Which, btw, Rick, I agree you need to attach a data item to your app in
some form that is the indicator flag. Not knowing more, I hesitate to
recommend a particular implementation (and you're far more clever/expert
in the environment than I, anyway :) )...
--
- Follow-Ups:
- Re: vb6 question
- From: dpb
- Re: vb6 question
- References:
- vb6 question
- From: Rick
- Re: vb6 question
- From: dpb
- Re: vb6 question
- From: christery
- Re: vb6 question
- From: dpb
- vb6 question
- Prev by Date: Re: Pass object or Raise Event?
- Next by Date: Re: Annual Trolley Car Awards
- Previous by thread: Re: vb6 question
- Next by thread: Re: vb6 question
- Index(es):
Relevant Pages
|
|