Date Format DD-MMM-YY

budLL

Well Known Member
Hi List,

I have a report which is exported to CSV. Somehow, user wants the header row shows the date format as DD-MMM-YY for the whole 12 periods.

I didn't find any function can comvert date to that format. So I tried to use a string variable to hole the date. For example, 31-Jan-02, I get the day first , then use concat function to append "-", then "JAN", then "-", then "02". It works very well with the "31-Jan-" part, but when i tried to append the year to it, it only took the 0, instead of the "02".

Does anyone know why? Or does anyone have other ways to handle this situation?

Thank you for any help.

Bud
 
We created a BSFN to do that. Looks like this, and works fine.


=======================================================================
NAMED ER: Get Date String in DD mmm YY format
=======================================================================
evt_mnDay
evt_mnMonth
evt_mnYear
evt_szYear
0001 If BF jdDateTransactionJulian is less than or equal to <Null Date>
0002 BF szDD_mmm_YY = ""
0003 Else
0004 VA evt_mnDay = date_day([BF jdDateTransactionJulian])
0005 VA evt_mnMonth = date_month([BF jdDateTransactionJulian])
0006 VA evt_mnYear = date_year([BF jdDateTransactionJulian])
0007 //
0008 Date Format Month Description
VA evt_mnMonth -> mnCalendarMonth
BF szDD_mmm_YY <- szDescription
0009 BF szDD_mmm_YY = substr([BF szDD_mmm_YY],0,3)
0010 //
0011 Math Numeric to String, Convert
VA evt_mnYear -> mnMathNumeric01
VA evt_szYear <- szVideoConstant30A
0012 VA evt_szYear = substr([VA evt_szYear], 2, 2)
0013 //
0014 BF szDD_mmm_YY = concat([VA evt_mnDay],concat(" ",concat([BF szDD_mmm_YY],concat(" ",[VA evt_szYear]))))
0015 End If
 
There's another option in OW, at the user profile level - that is, ALL his reports will have the Date format.
Is this what the user want?
 
No. they will only use this date format as the column headers.

The report is a budget summary report. So in the report, there are only a lot of amts showing out, there is no date in the report except the column header.
Bud
 
Thank you very much. I never create any BSFN myself and anyone else in my group. But I will try.

Bud
 
Go Bud Go!

There's always a first time Bud,
And it's not THAT difficult!
1 - Create a Data Structure,
2 - Create the (NER) BSFN,
3 - Attach the Data Structure,
4 - Copy the shared code,
5 - Build the BSFN, and
... call it from within your UBE/APPL.
Hardly wait to see you doing it,
PS As one of our honorable JDEListers/Whippers was saying: piece of cake!
 
Re: Go Bud Go!

Thank you, Adrian. You made me laugh.

I will let you know..... piece of cake!
 
Back
Top