on 10-10-2008 7:19 AM
Hi,
I have a MS SQL Database.
They are sending Date to XI. and I need to convert the Date sent by the sender and Give to Receiver in the Below Format :
SENDER -
> XI------> RECEIVER
2008-05-23 -
>XI-------> May2008
2007-04-19 -
>XI-------> April2007
SENDER DATA TYPE: datetime
How to achieve the Receiver format above specified?
How to achieve the above type of conversion in XI.
How to convert the Date sent by sender and Give the month and Year to the receiver in Above format mentioned.
Please Advice.
Regards,
Senthilprakash.
Edited by: senthilprakash selvaraj on Oct 10, 2008 8:19 AM
Edited by: senthilprakash selvaraj on Oct 10, 2008 8:20 AM
Hi,
You can do it with the DateTrans standard function.
Specify the following in the pattern.
input pattern: yyyy-MM-dd
Target Date Pattern : MMMMyyyy
Thanks
SaNv...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi all~
I am suprised why to substring, concat and use fixedValue table to make this mapping complex if this can be achieved with the standard function DateTrans.
I would like to enlightem about the month in the DateTrans function.
Using
MM - is to represent in arithmentic format like 01,02,03 etc...
MMM - is to represent in string format with a limitation on 3 character like jan,feb,mar etc...
MMMM - is to represent in string format of the complete month name like January, February etc....
Thanks
SaNv...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
u r mst welcome Sarvesh....
This feature is not documented and may be that is the reason we are not aware of this...!
The [help.sap documentation |http://help.sap.com/saphelp_nw04/helpdata/en/43/c4cdfc334824478090739c04c4a249/content.htm]has the function description only as Converts date format I to another date format O.
Would be helpful if this feature is documented.
Thanks
SaNv..
Hi Senthil,
The DateTrans standard function will get you the required output.
Format of Source Date : yyyy-MM-dd
Target Format : MMMMyyyy or MMMMMyyyy
Thanks,
Swapna.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
It is easy, since as a output you wnat only MONTH & YEAR, so just use the sbustring, concat & fixedValue table to get your result.
First without doing any date trans just do substring of year & month separatly, now pass the month to fixedValue table (where you will declare all the month & it's corresponding values) to get the month in desired format.
Now finally concatenate month & year to get the final result.
Regards,
Sarvesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
check the below thread..It will solve your issuse..
[https://forums.sdn.sap.com/click.jspa?searchID=17296719&messageID=6307657]
Regards,
Prakasu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
first you take your input date and use date transform to get the month
input yyyy-dd-mm
output mm
then use fixed value to get the corresponding month.
Again use your input and date transform to get the year.
input yyyy-dd-mm
output yyyy
use concatenate function to combine them.
regards,
ujjwal kumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Use DateTrans and fix value function
SENDER -
> XI------> RECEIVER
2008-05-23 -
>XI-------> May2008
2007-04-19 -
>XI-------> April2007
input length is 10
A be the input of format YYYY-MM-DD
B be the output of format MonthYYYY
Substring(0,3) = Year
Substring(4,5)= Month
The month value goes inside a FixValue function.
Then you concat both the substrings.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.