third_party_content:community:commentary:forums_nonworks:d725c2441a64f05585256976005282bc

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

At 12 OCT 2000 11:01:14AM Donna wrote:

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.

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/d725c2441a64f05585256976005282bc.txt
  • Last modified: 2023/12/28 07:40
  • by 127.0.0.1