on 02-21-2008 10:41 AM
can anyone give me the java code for replacing - in the date by . pls....
Hi,
U have a standard funtion in graphical mapping datetrans....using this u can change the date format into ur required format.
Regards,
Phani
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi u can use the standard function to replace the - with . using DateTrans function under DATE function category.
Source format dd - MM - YYYY
Target format dd.MM.YYYY.
or the java code will be similar to this ..
this is not the exact code.. modify it to suit ur requirement.
public class test
{
public static void main(String[] args) {
String arg1= "1;11-11&999,34";
String arg2 = "";
for (int i = 0;i<arg1.length();i++)
{
int j = arg1.charAt(i);
if ((j<48 || j>57 ) && j!=44)
arg1 = arg1.replace(arg1.charAt(i),':');
else if(j==44)
arg2 = arg2.concat(String.valueOf(".").toString());
else
arg2 = arg2.concat(String.valueOf(arg1.charAt(i)).toString());
}
System.out.println(arg2);
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
you can use the standard function
DateTrans
in message mapping.
In this function you can specify your source format.
For example:
MM-DD-YYYY
And your target format.
For example:
MM.DD.YYYY
Regards
Patrick
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
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.