Hi all
I reside in the UK and for our "sins" we still honor the European data format of DD/MM/YYYY.
There is a conversion code which 'e' which according to the D3 manual states:
|
e
|
Uses european date format regardless of current system default setting
|
This is great, however, I discovered something rather disturbing and am wondering whether anyone (this side of the Atlantic) can see (a) if I'm doing something wrong OR (b) has uncovered this.
BTW - I am aware of the set-date-eur option in a coldstart - which (in my case) I have not opted to have.
See this code:
*My_Date = '30/09/2022'
*crt My_Date
b_date = '19997'
crt b_date
c = Oconv(b_date, 'D4/E')
crt c
crt 'next '
d = Iconv(c, 'D4/E')
crt d
crt ' and Done!'
The results are as follows:
19997
30/09/2022
next
and Done!
Which is "disturbing" as the Iconv resolves to a NULL date!
Any ideas (please)
Thanks
Stefano
------------------------------
Stefano Gallotta
Managing Member
Simply Red Open Systems
Milnerton ZA
------------------------------
Yes, looking at the documentation, it looks like the "E" is in the "outsep" area and not the options, so it makes sense that it's going to work on OCONV only. So, not a bug, but rather a feature that was only half implemented. If you'd like to pursue this further, please open a case.
------------------------------
Brian S. Cram
Principal Technical Support Engineer
Rocket Software
------------------------------
Yes, looking at the documentation, it looks like the "E" is in the "outsep" area and not the options, so it makes sense that it's going to work on OCONV only. So, not a bug, but rather a feature that was only half implemented. If you'd like to pursue this further, please open a case.
------------------------------
Brian S. Cram
Principal Technical Support Engineer
Rocket Software
------------------------------
Hi Brian
OK - how do I open a case for this, please? I would also like to open a case regarding my "block comment" query (or rather request) I had some time ago
Thanks
------------------------------
Stefano Gallotta
Managing Member
Simply Red Open Systems
Milnerton ZA
------------------------------
Hi all
I reside in the UK and for our "sins" we still honor the European data format of DD/MM/YYYY.
There is a conversion code which 'e' which according to the D3 manual states:
|
e
|
Uses european date format regardless of current system default setting
|
This is great, however, I discovered something rather disturbing and am wondering whether anyone (this side of the Atlantic) can see (a) if I'm doing something wrong OR (b) has uncovered this.
BTW - I am aware of the set-date-eur option in a coldstart - which (in my case) I have not opted to have.
See this code:
*My_Date = '30/09/2022'
*crt My_Date
b_date = '19997'
crt b_date
c = Oconv(b_date, 'D4/E')
crt c
crt 'next '
d = Iconv(c, 'D4/E')
crt d
crt ' and Done!'
The results are as follows:
19997
30/09/2022
next
and Done!
Which is "disturbing" as the Iconv resolves to a NULL date!
Any ideas (please)
Thanks
Stefano
------------------------------
Stefano Gallotta
Managing Member
Simply Red Open Systems
Milnerton ZA
------------------------------
Is it case sensitive by any chance? You use the "e" in the statement but your code has "E".
------------------------------
Alex Polglaze
The Book-Keeping Network
Perth Western Australia
+61419 776 348
apolglaze@book-keepingnetwork.com.au
https://www.book-keepingnetwork.com.au/
------------------------------
Is it case sensitive by any chance? You use the "e" in the statement but your code has "E".
------------------------------
Alex Polglaze
The Book-Keeping Network
Perth Western Australia
+61419 776 348
apolglaze@book-keepingnetwork.com.au
https://www.book-keepingnetwork.com.au/
------------------------------
Hi
Alex
No, the first thing I checked :)------------------------------
Stefano Gallotta
Managing Member
Simply Red Open Systems
Milnerton ZA
------------------------------
Hi Alex
No, the first thing I checked :)
------------------------------
Stefano Gallotta
Managing Member
Simply Red Open Systems
Milnerton ZA
------------------------------
Hy i use the statement
SET-DATE-EUR
in my logon macro of the account.. so all my dates are convert to this format and also inside programs
*My_Date = '30/09/2022'
*crt My_Date
crt 'Now Eurpoean'
EXECUTE 'set-date-eur' ;* European
b_date = '19997'
crt b_date
c = Oconv(b_date, 'D4/')
crt c
crt 'next '
d = Iconv(c, 'D4/')
crt d
crt 'Now American'
EXECUTE 'set-date-std' ;* American
b_date = '19997'
crt b_date
c = Oconv(b_date, 'D4/')
crt c
crt 'next '
d = Iconv(c, 'D4/')
crt d
crt ' and Done!'
https://www3.rocketsoftware.com/rocketd3/support/documentation/d3nt/102/refman/TCL/set_date_eur_command.htm#reference5811
------------------------------
Alberto Leal
System Analyst
Millano Distribuidora de Auto Pecas Ltda
Varzea Grande MT BR
------------------------------
Hy i use the statement
SET-DATE-EUR
in my logon macro of the account.. so all my dates are convert to this format and also inside programs
*My_Date = '30/09/2022'
*crt My_Date
crt 'Now Eurpoean'
EXECUTE 'set-date-eur' ;* European
b_date = '19997'
crt b_date
c = Oconv(b_date, 'D4/')
crt c
crt 'next '
d = Iconv(c, 'D4/')
crt d
crt 'Now American'
EXECUTE 'set-date-std' ;* American
b_date = '19997'
crt b_date
c = Oconv(b_date, 'D4/')
crt c
crt 'next '
d = Iconv(c, 'D4/')
crt d
crt ' and Done!'
https://www3.rocketsoftware.com/rocketd3/support/documentation/d3nt/102/refman/TCL/set_date_eur_command.htm#reference5811
------------------------------
Alberto Leal
System Analyst
Millano Distribuidora de Auto Pecas Ltda
Varzea Grande MT BR
------------------------------
Hi Alberto,
Yes thanks, aware of the set-date-eur line in coldstart.
I was just (disturbed) that the ICONV would not return a valid date when I JUST OCONV the (valid) date.
Brian explained why and all's good thanks :)
It's just something a developer needs to be made aware of when (and if) you receive an Excel spreadsheet with a date (assume here 'dd/mm/yyyy') and good practice is to ICONV said date.
This is how I came about this "issue" - no set-date-eur in coldstart - date looks good until you ICONV and OCONV it back with 'D4/E' - and surprise surprise it's NULL
[Per my test example:]
But thanks :)
b_date = '19997'
crt b_date
c = Oconv(b_date, 'D4/E')
crt c
crt 'next '
d = Iconv(c, 'D4/E')
crt d
crt ' and Done!'
------------------------------
Stefano Gallotta
Managing Member
Simply Red Open Systems
Milnerton ZA
------------------------------
Hi Alberto,
Yes thanks, aware of the set-date-eur line in coldstart.
I was just (disturbed) that the ICONV would not return a valid date when I JUST OCONV the (valid) date.
Brian explained why and all's good thanks :)
It's just something a developer needs to be made aware of when (and if) you receive an Excel spreadsheet with a date (assume here 'dd/mm/yyyy') and good practice is to ICONV said date.
This is how I came about this "issue" - no set-date-eur in coldstart - date looks good until you ICONV and OCONV it back with 'D4/E' - and surprise surprise it's NULL
[Per my test example:]
But thanks :)
b_date = '19997'
crt b_date
c = Oconv(b_date, 'D4/E')
crt c
crt 'next '
d = Iconv(c, 'D4/E')
crt d
crt ' and Done!'
------------------------------
Stefano Gallotta
Managing Member
Simply Red Open Systems
Milnerton ZA
------------------------------
Hy Stefano...
my first awnser as incomplete...
then i editid
alternative you can use
*My_Date = '30/09/2022'
*crt My_Date
crt 'Now Eurpoean'
EXECUTE 'set-date-eur' ;* European
b_date = '19997'
crt b_date
c = Oconv(b_date, 'D4/')
crt c
crt 'next '
d = Iconv(c, 'D4/')
crt d
crt 'Now American'
EXECUTE 'set-date-std' ;* American
b_date = '19997'
crt b_date
c = Oconv(b_date, 'D4/')
crt c
crt 'next '
d = Iconv(c, 'D4/')
crt d
crt ' and Done!'
------------------------------
Alberto Leal
System Analyst
Millano Distribuidora de Auto Pecas Ltda
Varzea Grande MT BR
------------------------------
Hi Brian
OK - how do I open a case for this, please? I would also like to open a case regarding my "block comment" query (or rather request) I had some time ago
Thanks
------------------------------
Stefano Gallotta
Managing Member
Simply Red Open Systems
Milnerton ZA
------------------------------
If you have an RBC login, you can open one there I think. I don't know how to do that. A lot of people will email support@rocketsoftware.com with a small description of your issue. Make sure you specify that it's D3 and please include a system ID number.
------------------------------
Brian S. Cram
Principal Technical Support Engineer
Rocket Software
------------------------------
Hy Stefano...
my first awnser as incomplete...
then i editid
alternative you can use
*My_Date = '30/09/2022'
*crt My_Date
crt 'Now Eurpoean'
EXECUTE 'set-date-eur' ;* European
b_date = '19997'
crt b_date
c = Oconv(b_date, 'D4/')
crt c
crt 'next '
d = Iconv(c, 'D4/')
crt d
crt 'Now American'
EXECUTE 'set-date-std' ;* American
b_date = '19997'
crt b_date
c = Oconv(b_date, 'D4/')
crt c
crt 'next '
d = Iconv(c, 'D4/')
crt d
crt ' and Done!'
------------------------------
Alberto Leal
System Analyst
Millano Distribuidora de Auto Pecas Ltda
Varzea Grande MT BR
------------------------------
you can do something like this
PROGRAM CONVERTDATE (DATE$CON)
DATE = FIELD(DATE$CON,"/",1)
MONTH = FIELD(DATE$CON,"/",2)
YEAR = FIELD(DATE$CON,"/",3)
DATE$CON = MONTH:"/"DATE:"/":YEAR
EXECUTE 'SET-DATE-STD'
DATE$CON = ICONV(DATE$CON,"D4/")
RETURN
-----------------------------------------------
DATE$E = "13/10/2022" ;* EUROPEAN DATE
DATA$AMERICAN = ICONV(DATE$,"CALL CONVERTDATE)
------------------------------
Alberto Leal
System Analyst
Millano Distribuidora de Auto Pecas Ltda
Varzea Grande MT BR
------------------------------
you can do something like this
PROGRAM CONVERTDATE (DATE$CON)
DATE = FIELD(DATE$CON,"/",1)
MONTH = FIELD(DATE$CON,"/",2)
YEAR = FIELD(DATE$CON,"/",3)
DATE$CON = MONTH:"/"DATE:"/":YEAR
EXECUTE 'SET-DATE-STD'
DATE$CON = ICONV(DATE$CON,"D4/")
RETURN
-----------------------------------------------
DATE$E = "13/10/2022" ;* EUROPEAN DATE
DATA$AMERICAN = ICONV(DATE$,"CALL CONVERTDATE)
------------------------------
Alberto Leal
System Analyst
Millano Distribuidora de Auto Pecas Ltda
Varzea Grande MT BR
------------------------------
Hi Stefano,
While I have no practical experience with European dates, I did play around with this a bit.
I found it odd that the "e" and "u" options were put in the "outsep" section.
It almost makes me think that these are not true options, but the ICONV command seems to accept them. Strange.
I could not get input conversion to work with the "e" option but was able to get both input and output conversion to work using the SET-DATE-STD and SET-DATE-EUR commands.
In my examples I use the "(L" option so that only my PIB is affected.
Hope this helps...
Lance
Heading = @( 10 ) : 'Internal' : @( 20 ) : 'External' : @( 35 ) : 'Internal(Conv)'
CRT @( -1 ) : 'Current SET-DATE setting is US format' ; CRT
Today = DATE()
TodayOut = Today'D4/'
TodayIn = TodayOut'DI'
CRT Heading
CRT 'Today:' :@( 10 ): Today : @(20) : TodayOut : @(35) : TodayIn
CRT
CRT "EXECUTE 'SET-DATE-EUR (L' command"
CRT 'Current SET-DATE setting is European format' ; CRT
EXECUTE 'SET-DATE-EUR (L'
Today = DATE()
TodayOut = Today'D4/'
TodayIn = TodayOut'DI'
CRT Heading
CRT 'Today:' :@( 10 ): Today : @(20) : TodayOut : @(35) : TodayIn
CRT
CRT "EXECUTE 'SET-DATE-STD (L' command"
CRT 'Current SET-DATE setting is US format' ; CRT
EXECUTE 'SET-DATE-STD (L'
Today = DATE()
TodayOut = Today'D4/'
TodayIn = TodayOut'DI'
CRT Heading
CRT 'Today:' :@( 10 ): Today : @(20) : TodayOut : @(35) : TodayIn
CRT
CRT
Output:
Current SET-DATE setting is US format
Internal External Internal(Conv)
Today: 20011 10/14/2022 20011
EXECUTE 'SET-DATE-EUR (L' command
Current SET-DATE setting is European format
Internal External Internal(Conv)
Today: 20011 14/10/2022 20011
EXECUTE 'SET-DATE-STD (L' command
Current SET-DATE setting is US format
Internal External Internal(Conv)
Today: 20011 10/14/2022 20011
------------------------------
Lance Mcmillin
Sr Programmer Analyst
Health Advocates
Sherman Oaks CA US
------------------------------
Hi Stefano,
While I have no practical experience with European dates, I did play around with this a bit.
I found it odd that the "e" and "u" options were put in the "outsep" section.
It almost makes me think that these are not true options, but the ICONV command seems to accept them. Strange.
I could not get input conversion to work with the "e" option but was able to get both input and output conversion to work using the SET-DATE-STD and SET-DATE-EUR commands.
In my examples I use the "(L" option so that only my PIB is affected.
Hope this helps...
Lance
Heading = @( 10 ) : 'Internal' : @( 20 ) : 'External' : @( 35 ) : 'Internal(Conv)'
CRT @( -1 ) : 'Current SET-DATE setting is US format' ; CRT
Today = DATE()
TodayOut = Today'D4/'
TodayIn = TodayOut'DI'
CRT Heading
CRT 'Today:' :@( 10 ): Today : @(20) : TodayOut : @(35) : TodayIn
CRT
CRT "EXECUTE 'SET-DATE-EUR (L' command"
CRT 'Current SET-DATE setting is European format' ; CRT
EXECUTE 'SET-DATE-EUR (L'
Today = DATE()
TodayOut = Today'D4/'
TodayIn = TodayOut'DI'
CRT Heading
CRT 'Today:' :@( 10 ): Today : @(20) : TodayOut : @(35) : TodayIn
CRT
CRT "EXECUTE 'SET-DATE-STD (L' command"
CRT 'Current SET-DATE setting is US format' ; CRT
EXECUTE 'SET-DATE-STD (L'
Today = DATE()
TodayOut = Today'D4/'
TodayIn = TodayOut'DI'
CRT Heading
CRT 'Today:' :@( 10 ): Today : @(20) : TodayOut : @(35) : TodayIn
CRT
CRT
Output:
Current SET-DATE setting is US format
Internal External Internal(Conv)
Today: 20011 10/14/2022 20011
EXECUTE 'SET-DATE-EUR (L' command
Current SET-DATE setting is European format
Internal External Internal(Conv)
Today: 20011 14/10/2022 20011
EXECUTE 'SET-DATE-STD (L' command
Current SET-DATE setting is US format
Internal External Internal(Conv)
Today: 20011 10/14/2022 20011
------------------------------
Lance Mcmillin
Sr Programmer Analyst
Health Advocates
Sherman Oaks CA US
------------------------------
Hello group!
I have a very old mvBase and can't seem to find the commands SET-DATE-STD nor SET-DATE-EUR. Where can I execute this global system setting? TIA
-Peter G
------------------------------
Peter Gonzalez
St. Louis, MO US
------------------------------
Hello group!
I have a very old mvBase and can't seem to find the commands SET-DATE-STD nor SET-DATE-EUR. Where can I execute this global system setting? TIA
-Peter G
------------------------------
Peter Gonzalez
St. Louis, MO US
------------------------------
How old is "very old"? What's the version?
------------------------------
Brian S. Cram
Principal Technical Support Engineer
Rocket Software
------------------------------
Hello group!
I have a very old mvBase and can't seem to find the commands SET-DATE-STD nor SET-DATE-EUR. Where can I execute this global system setting? TIA
-Peter G
------------------------------
Peter Gonzalez
St. Louis, MO US
------------------------------
You could try UDATE for American and IDATE for International
------------------------------
Mike Young
Senior PS Techical Consultant
Aptean
Atlanta GA US
------------------------------
How old is "very old"? What's the version?
------------------------------
Brian S. Cram
Principal Technical Support Engineer
Rocket Software
------------------------------
Brian,
It's MV.BASE 1.3.02 (yes, it's very old) It has been converted to OpenQM but there is still some reporting on mvBase.
------------------------------
Peter Gonzalez
St. Louis, MO US
------------------------------
You could try UDATE for American and IDATE for International
------------------------------
Mike Young
Senior PS Techical Consultant
Aptean
Atlanta GA US
------------------------------
Mike, that worked! thank you.
BTW on another system I wrote a program to convert dates and named the program IDATE. Little did I know that mvBase had that same MD name.
------------------------------
Peter Gonzalez
St. Louis, MO US
------------------------------
Hello group!
I have a very old mvBase and can't seem to find the commands SET-DATE-STD nor SET-DATE-EUR. Where can I execute this global system setting? TIA
-Peter G
------------------------------
Peter Gonzalez
St. Louis, MO US
------------------------------
Just noticed all the other useful responses in this thread....I was extremely late to the party!...apologies. PG
Hi Peter
You didn't mention the version of mvbase that you are working with. However, as far as I remember we have been using the following SYSPROG verb for decades. They set the date format system wide so use with care.
IDATE - sets 'international' (European) date format
we don't use UDATE but I believe that it sets US date format
I hope that is helpful to you
best regards
Phil
------------------------------
Phil Griffiths
Director
Qualtec Systems Ltd
Birmingham GB
+44 675 465332
------------------------------