Tuesday, April 30, 2013

Crystal Reports : Date Formatting

A blog reader recently had a question regarding a very special Date formatting. He needed specific separators and day, month and year order (DD, MM, then YYYY). This can be achieved through the Field Formatting options of any Date field.

It is important to note that the field type must be Date in order for the Date Formatting options to be available.

1. Right-click on the Date field in question, select "Format Field"

2. Click the "Customize" button

3. Click the Date tab

4. From the "Format" drop downs, select the appropriate value type (numbers or letters). Do this for Day, Month and Year. In our case, we select a two digit number format.

5. Beneath the Order area (right hand side), select the appropriate value order. In our case, we want DMY (Day, Month, Year).

6. If desired, change the date separators below. In our special case, the user in question needed foreign language characters to separate the values within the date.

7. Ok your way out

This is very useful; no matter how you change the Format of the Date, it still "acts" like a Date Value, allowing all the easy math that implies. Try it!

2 comments:

custom essays writing service said...

Sharpen your pencils and sharpen your mind. Writing is a gift of expression and feelings. Consider us on hand at all times to provide you with a first class writing service.

Handrail Brackets said...

Hello
Kite projects Is providing construction, engineering and facilities management to provide edge protection, vertical access and hand railing solutions to Industries in United Kingdom!