date conversion

CTerrien

Member
Does anyone know if there is a function to convert a date like 9/2/04 so that it displays 09/02/04? I want to be able to add 0 to the month and day positions of the date if they are not double digit. Report output looks sloppy if some of the dates are six characters long while others are only four or five. I have looked all over the list and can't find the answers I'm looking for.

Thank you,
Chris

OneWorld XE SP23
ISeries 400
 
Chris,

There are several BSFNs that do date conversions that I have used in the past (just can't remember what they are).

Click the "Business Function" button in event rules, enter *Convert Date* in description and click find.

Good luck,
Barry
 
There is a very useful KG document titled How to use Date BSFNs. I will try and attach it, otherwise Search for it on KG.
 

Attachments

  • 80279-HowtouseDateBSFN.doc
    233.5 KB · Views: 4,693
Hi Chris,

First of all, you are welcome aboard.

In my humbel opinion, formating date basically is not a BSFN, function issue, but User Profile and/or Regional Setting issue.

Set the Date Format DMY, MDY or YMD (which is appropriately sequenced for you) in the User Profile of XE.

You can set Date Format in the profile as: "Use System Value". In this case set the appropriate date format in the Regional Settings of the operating system.

Of course, if you want to force the date format in some APPL or UBE, independently of Profile setting, you can use conversion BSFNs.

Regards,

Zoltán
 
Zoltan,
Worked like a charm. Thanks for the help. I didn't even know that date option was available under the user profile. I tested this by changing only my profile. How do I switch the "Use System Value" so that all users have the new format?

Thanks again,
Chris
 
Chris,

Glad to read, that it works.

Currently I don't know, in which field of which table stores the system this value.

It isn't too hard to make a little investigation to figure it out.

After you know the table and field name (and the values), then you can modify all user profile from:
a.) SQL
b.) Access
c.) develop a pretty little interactive reusable APPL to do this regulary.

If you need more help to solve this, then let us know.

Regards,

Zoltán
 
Back
Top