format DATE.TIME in DEAL.SLIP.FORMAT application?

  • phoenixvn
  • Topic Author
  • Offline
  • New Member
  • New Member
More
16 years 3 months ago #3564 by phoenixvn
Hi everybody,
I'm making a deal slip for FUNDS.TRANSFER application; in this deal slip, i want to get DATE.TIME field. How can i format it as "12 JUN 09 14:20" ?
Please help me.

Thank you so much.

Please Log in or Create an account to join the conversation.

More
16 years 3 months ago #3574 by udayangi01
what you can do is attach routine to format the DATE.TIME and bring back and display it.

You have to define that routine in the PGM.FILE as a 'S' type record.

in the DEAL.SLIP.FORMAT in the field FORMAT give the routine name prefixed by '@' sign.

5. 3 FIELD.......... DATE.TIME
6. 3 COLUMN......... 20,3
7. 3. 1 FORMAT...... @THIS.IS.THE.FORMATING.ROUTINE

rgds,

Udayangani

Please Log in or Create an account to join the conversation.

  • phoenixvn
  • Topic Author
  • Offline
  • New Member
  • New Member
More
16 years 3 months ago #3575 by phoenixvn
udayangi01 wrote:

what you can do is attach routine to format the DATE.TIME and bring back and display it.

You have to define that routine in the PGM.FILE as a 'S' type record.

in the DEAL.SLIP.FORMAT in the field FORMAT give the routine name prefixed by '@' sign.

5. 3 FIELD.......... DATE.TIME
6. 3 COLUMN......... 20,3
7. 3. 1 FORMAT...... @THIS.IS.THE.FORMATING.ROUTINE

rgds,

Udayangani


I try to use supported format's T24. I don't want to use routine in format field like that. In enquiry designer, i can use format type "DATE" for field DATE.TIME is ok. T24 supports any format for my case (in DEAL.SLIP.FORMAT), haven't it?

Thanks

Please Log in or Create an account to join the conversation.

More
16 years 3 months ago #3577 by udayangi01
Hi,

As far as I know there isn't much options in Deal slips as enquiry designer for formatting, I have once done this kind of a thing using a subroutine to format the output of DATE.TIME.

you can use a simple routine as below.

SUBROUTINE DATE.FORMATTER(DTIME)
$INSERT I_EQUATE
$INSERT I_COMMON
$INSERT I_F.FUNDS.TRANSFER

DATE.TIME = DTIME

F1 = DATE.TIME[1,2]
F2 = DATE.TIME[3,2]
F3 = DATE.TIME[5,2]
F4 = DATE.TIME[7,2]
F5 = DATE.TIME[9,2]

DTIME = F3:'-':F2:'-':F1:'/':F4:':':F5

END

Please Log in or Create an account to join the conversation.

  • phoenixvn
  • Topic Author
  • Offline
  • New Member
  • New Member
More
16 years 3 months ago #3586 by phoenixvn
thank you so much!

Please Log in or Create an account to join the conversation.

Time to create page: 0.038 seconds