Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.basic.visual.misc > #1694

Re: Dates and Regional settings

From "David Cox" <d.cox@hushmail.com>
Newsgroups comp.lang.basic.visual.misc
Subject Re: Dates and Regional settings
Date 2013-01-03 19:23 -0600
Organization A noiseless patient Spider
Message-ID <kc5b97$ugl$1@dont-email.me> (permalink)
References <kc033i$rcg$1@dont-email.me> <sdx9cmFThd5QFwHA@invalid.uk.co.demon.merlyn.invalid>

Show all headers | View raw


"Dr J R Stockton" <reply1300@merlyn.demon.co.uk.invalid> wrote in message 
news:sdx9cmFThd5QFwHA@invalid.uk.co.demon.merlyn.invalid...
> In comp.lang.basic.visual.misc message <kc033i$rcg$1@dont-email.me>,
> Tue, 1 Jan 2013 19:38:53, David Cox <d.cox@hushmail.com> posted:
>
>>
>>The variable NewVal would receive a DateTimePicker value property. Is this
>>code safe for regional settings?
>
> Never use "regional settings"!.  Either follow an applicable formal
> International Standard, or limit yourself to your local custom, or
> employ a term such as "user settings".
>
> In the Great World Outside, and even in some cases within the USA,
> location does not inevitably govern preference.
>
> -- 
> (c) John Stockton, nr London, UK.   E-mail, see Home Page.    Turnpike 
> v6.05.
> Website  <http://www.merlyn.demon.co.uk/> - w. FAQish topics, links, 
> acronyms
> PAS EXE etc. : <http://www.merlyn.demon.co.uk/programs/> - see in 
> 00index.htm
> Dates - miscdate.htm estrdate.htm js-dates.htm pas-time.htm critdate.htm 
> etc.

In that sentence I wanted to avoid regional settings. I wanted the code to 
work despite any changes to regional settings. I wasn't trying to deal with 
presentation in that code. I wanted to make sure that the date was saved 
correctly in the database even if regional settings changed.

I have also changed the code to check for no date, I don't want to allow no 
date by checking Int(NewVal)=0:

Public Property Let scDate(NewVal As Date)
    If Not mflgEditing Then Err.Raise 383
    If Int(NewVal)=0 Then Err.Raise InputErr, "ScaleReceipt", ErrDate
    If Int(mudtProps.scDate)<>Int(NewVal) then
       mudtprops.scDate = Int(NewVal)
       ValueChanged
    End If
End Property 

Back to comp.lang.basic.visual.misc | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Dates and Regional settings "David Cox" <d.cox@hushmail.com> - 2013-01-01 19:38 -0600
  Re: Dates and Regional settings ralph <nt_consulting@yahoo.com> - 2013-01-01 20:49 -0600
    Re: Dates and Regional settings "David Cox" <d.cox@hushmail.com> - 2013-01-01 21:16 -0600
      Re: Dates and Regional settings ralph <nt_consulting@yahoo.com> - 2013-01-01 22:25 -0600
  Re: Dates and Regional settings Dr J R Stockton <reply1300@merlyn.demon.co.uk.invalid> - 2013-01-03 19:13 +0000
    Re: Dates and Regional settings "David Cox" <d.cox@hushmail.com> - 2013-01-03 19:23 -0600
      Re: Dates and Regional settings Deanna Earley <dee.earley@icode.co.uk> - 2013-01-04 09:47 +0000

csiph-web