Setting system date to yyyy-mm-dd permanently

Barry G. Sumpter barry at noodlebox.com.au
Tue Jul 22 16:46:45 CDT 2008


Can't tell you how many hours in my IT career I've spent sorting out date
and date formats.

Far to many.

 

Where "10/09/08" could be three different dates depending on the format.

 

 

But, once vDateFomat is set that's it.

 

Until you or something else resets it to another value by intent or mistake.

i.e. via legacy code or via vStudio etc.

 

So I always set it just after each openDB in my project Admin app.

And never set it in my project client app.

 

I could place a check in my client app.

And change it back if needed or send a message to the db admin etc.

 

 

 

 

 

 

 

 

 

From: valentina-studio-bounces+barry=noodlebox.com.au at lists.macserve.net
[mailto:valentina-studio-bounces+barry=noodlebox.com.au at lists.macserve.net]
On Behalf Of william humphrey
Sent: Wednesday, 23 July 2008 4:58 AM
To: valentina-studio at lists.macserve.net
Subject: Re: Setting system date to yyyy-mm-dd permanently

 

Should this property always be set when you open the database, everytime? 

 

I haven't seen any examples of anyone doing this in a Runtime Revolution use
of Valentina and my present use of it on the Intel platform seems to be
fine. But the lack of examples seen is not anything new.

 

Would the following be corect?

 

In Runtime Revolution would you do:

 

 

on mouseUp pMouseBtnNo

  get valentina_Init( 10 * 1024 * 1024,"extremely_way_long_serial_number",,)

  DatabaseOpen

end mouseUp

 

on DatabaseOpen

 

  put VDatabase_Constructor() into gDatabase

  -- Build db full path near to stack:

  get the effective filename of this stack

  set the itemdel to slash

  put the (item 1 to -2 of it) & slash & "MyDatabase.vdb" into dbPath

  get VDatabase_Open( gDatabase, dbPAth )

  -- Put the make sure system date is set stuff here?

  VDatabase_DateFormat( gDatabase,"kYMD" ) -- specifies the format of date.

  VDatabase_DateSep( gDatabasef, "-" ) -- separator for date

  -- Always set the date format everytime you open the database?

end DatabaseOpen

 

Thanks for your help...

 

Bill

 

On Tue, Jul 22, 2008 at 2:17 PM, Joseph Morgan <joseph at checkos.com> wrote:

I thought you have to set the date for the database each time you open
it no matter what. I always use yyyy-mm-dd. But no matter the
platform, the date always reverts to something else. This is the case
in vstudio and outside of vstudio (ie. realbasic or perhaps runrev). I
don't think this is a bug as I am pretty sure I recall Ruslan stating
that this was the intended behavior. I always run the following sql
command on any database right after opening it and it always works for
me:

SET PROPERTY DateTimeFormat,DateSeparator,TimeSeparator OF DATABASE TO
'kYMD','-',':';

You may want to check out the wiki for more info but I think kMDY
would give you the mm/dd/yy dates then set your date separator and
that should work.


Joseph


On Jul 22, 2008, at 12:17 PM, william humphrey wrote:

> To add to system date and Valentina Studio date "funkiness". On an
> Intel Mac which has the U.S. system date (no attempt to set a custom
> system date to match YYYY-MM-DD there is no problem with the
> settings in Valentina Studio and the settings in the database
> changing by themselves back to mm/dd/yy.
>
> But it appears to happen on the older G4 Mac even to a database that
> is moved back and forth and used in RunRev without opening it in
> vStudio. There is no way I can report this to Mantis yet as I
> haven't figured out exactly what is causing the database to change
> the date settings on their own back to mm/dd/yy but it is an
> important bug as all sorts of crashes result when the data in the
> date fields are formated yyyy-mm-dd and the database is expecting
> them to be mm/dd/yy.
>
> Has anyone else encountered this date setting weirdness? For me it
> is limited to the G4 mac running OS 10.4 and does not happen on the
> Intel Mac running OS 10.5

> _______________________________________________
> Valentina-studio mailing list
> Valentina-studio at lists.macserve.net
> http://lists.macserve.net/mailman/listinfo/valentina-studio

_______________________________________________
Valentina-studio mailing list
Valentina-studio at lists.macserve.net
http://lists.macserve.net/mailman/listinfo/valentina-studio




-- 
http://www.bluewatermaritime.com 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macserve.net/pipermail/valentina-studio/attachments/20080723/d1c8e4a6/attachment.html 


More information about the Valentina-studio mailing list