[[https://www.revelation.com/|Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community]]
==== Dates Export Format (AREV Specific) ====
=== At 12 OCT 2000 11:01:14AM Donna wrote: ===
{{tag>"AREV Specific"}}
I am in the process of setting up many, many ASCII exports from Arev. I need the dates to be 11281999 (11/28/1999) just the numbers with no slashes. If I remove the D4/ then I get the dates in Arev. Can anyone help me to get the dates as mmddyyyy in the correct calendar date rather than the Arev stored info?
We are using Ensemble and unfortunately our IT dept is demanding a conversion. :(
Thank you
----
=== At 12 OCT 2000 11:30AM WinWin/Revelation Technical Support wrote: ===
Donna-
A fast, simple way would be to make a new dictionary field (or fields) that are symbolics. If you're exporting HIRE_DATE make a symbolic named HIRE_DATE_SYM.
The formula would be:
ANS =OCONV({HIRE_DATE}, 'D4/')
CONVERT '/' TO '' IN ANS
@ANS=ANS
Hope it helps-
Mike Ruane
----
=== At 12 OCT 2000 01:08PM Don Miller - C3 Inc. wrote: ===
If this is going to be the format for a lot of dates to be exported, you might consider making a User-Defined-Conversion (UDC). Essentially, it can be an ICONV/OCONV function. In skeleton, here's what it looks like:
* it should be called:
OCONV(yourdata,'DATE_CNV') or ICONV(yourdata,'DATE_CNV')
depending on how you're doing your export, you may use it in a convert spec, an R/LIST sentence using the OCONV call or in your R/BASIC code.
CASE CONV=OCONV"
Foo=OCONV(DATA_IN,"D4/")
SWAP "/" with "" in Foo
RETURN_DATA=Foo
CASE CONV=ICONV"
* assume you're importing mmddyyyy from another system and have to
* get it into REV internal format
TEMP=DATA_IN1,2:'/':DATA_IN3,2:'/':DATA_IN5,999
Cnv=ICONV(TEMP,'D')
IF Cnv=' then
;;;do your error handling
end else
RETURN_DATA=Cnv
end
CASE 1
* invalid conversion or whatever
HTH
Don Miller
C3 Inc.
[[https://www.revelation.com/revweb/oecgi4p.php/O4W_HANDOFF?DESTN=O4W_RUN_FORM&INQID=NONWORKS_READ&SUMMARY=1&KEY=D725C2441A64F05585256976005282BC|View this thread on the forum...]]