Solution: Date format in YYYY/MM/DD. (AREV Specific)
At 28 APR 1998 07:50:14PM Michael Slack wrote:
Maybe everyone knew this already but here goes anyway.
We needed to be able to export from AREV and import back to AREV but the database that would recieve and send back the data could only use the date format of "YYYY/MM/DD'. Myself and another programmer were tearing our hair our (our own, not each others) on how to get AREV to export and import date columns in that format. What we stumbled onto was a conversion of "D/JS". So a TCL line like "EVAL PRINT OCONV(DATE(),'D/JS')" will display something like "1998/04/28".
So I assume (because I haven't tested it myself yet) that using all 6 date format options in combination with the 3 month format options, that I should be able to create a lot more date styles than I originally thought possible.
I do wish that the R/Basic manual on that section went into a little more detail on things like this. Yes, once I found the format for myself I could read into some of the examples what I was looking for in the first place. It would have been nice not to have to go looking for it quite so hard in the first place.
I hope this is of help to someone.
Michael Slack
At 29 APR 1998 12:06PM Victor Engel wrote:
The R/BASIC manual describes all this fully. Look under OCONV. There is a separate section for data formats. Incidentally, I always use the sort character (J in your example) when writing import/export programs because the default order is dependent on the environment setting. If someone changed the environment setting and this was not explicitly coded, the import/export would fail.