At 07:35 AM 12/6/2013, Tony IJntema wrote:
Is it possible to adjust the date setting automatically to the date setting
of windows
In Europe mostly dd/mm/yyyy is being used, but in the USA it is mm/dd/yyyy.
What I like to do is getting the date format from Windows and adjust the
date setting automatically in the database.
Tony,
A new (CVAL('keyword')) or (GETVAL('Computer','DATE')) function would be a
nice addition to R:BASE eXtreme 9.5.
Having said that, technically, every R:BASE session requires a configuration
(.CFG) file. On your end or with your compiled application, you could easily
update the DATE FORMAT, DATE SEQUENCE, DATE YEAR, and DATE CENTURY options
within the "Format" section of RBENGINE95_64.CFG file.
Then, in your application startup file, BEFORE CONNECTing the database, you
can get the default DATE FORMAT and DATE SEQUENCE using the (CVAL('keyword'))
function to enforce the DATE settings AFTER CONNECTing the database.
-- Example (Enforcing RBENGINE95_64.CFG DATE FORMAT and SEQUENCE Settings):
DISCONNECT
-- Get Locale Date Format and Sequence from RBENGINE95_64.CFG file
SET VAR vDefaultDateFormat = (CVAL('DATE FORMAT'))
SET VAR vDefaultDateSequence = (CVAL('DATE SEQUENCE'))
-- Enforce Locale Date Format and Sequence
CONNECT dbname IDENTIFIED BY user password
SET DATE FORMAT .vDefaultDateFormat
SET DATE SEQUENCE .vDefaultDateSequence
-- and then continue with your business application
RETURN
This approach will always use the DATE settings from customized CFG file.
Dat is alles wat er is.
Hoop dat het helpt!
Very Best R:egards,
Razzak.
www.rbase.com
www.facebook.com/rbase
--
30+ years of continuous innovation!
15 Years of R:BASE Technologies, Inc. making R:BASE what it is today!
--