Date conversions in PI/XI

By Pravesh Sharma, CSC

The standard function DateTrans has the capability of not only converting date in to numeric formats and vice versa, but also can convert the month to a string representation.

Following is the format conversion of the month value in the function.  

Pattern

The DateTrans function not only can convert the ddMMyyyy to any other numeric format but also can convert the month to a string representation using the patterns for month.

Following is the format conversion of the month value in the function.  

 Pattern

 Description

 MM

 Represent month in numeric format like 01,02,03

 MMM

 Represent month in string format with a limitation on 3 character like Jan

 MMMM

 Represent month in a complete string format like January, February

Here is a screen shot of how a month can be converted into string representation within a date.

             12/04/2009        Input:  dd/MM/yyyy     12-Apr-2009

                                       Output: dd-MMM-yyyy  

              10/05/2009       Input:  dd/MM/yyyy      May09

                                       Output: MMMMyy  

              June-23-2009   Input:  MMMM-dd-yyyy 23-06-2009

                                       Output: dd/MM/yy

Please send us your feedback/suggestions at webmaster@SAPTechnical.COM 

HomeContribute About Us Privacy Terms Of Use • Disclaimer • SafeCompanies: Advertise on SAPTechnical.COM | Post JobContact Us  

Graphic Design by Round the Bend Wizards

footer image footer image