on 03-17-2008 1:12 PM
Hi,
Below is a representation of the Time Stamp of a JAVA default trace file:
#1.5
#00145E489D04016C0001031700130074000447C39A926E35#1204805344325#XIRUN.com.sap.aii.ibrun.server.valueMapping.ValueMappingService#sap.com/com.sap.xi.services#XIRUN.com.sap.aii.ibrun.server.valueMapping.ValueMappingService#J2EE_GUEST#0#SAP J2EE Engine JTA Transaction : []#XIP#PIAFUSER #47CF6344D7D702B6000000000AB6F547#output##0#0#Error#1#/Applications/ExchangeInfrastructure/IntegrationServer#Plain###Error During value mapping
........................
etc etc
I want to convert this string to a time stamp.
What is the process of doing this?
the text below represents the date and time
#00145E489D04016C0001031700130074000447C39A926E35#1204805344325#
Does anyone have an Algorithm in java to convert it into a time stamp
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
To convert these strings to timestamps, you can use logviewer lv.bat/lv.sh file. You can find this under :
j2ee\cluster\admin\logviewer-standalone folder.
e.g. you want to convert defaultrace file, following will be the command :
lv.bat defaultrace.trc -O newdefaultrace.txt
This will write all the output to newdefaultrace.txt with the strings converted to timestamp.
Hope this helps.
Regards,
Snehal
Edited by: Snehal Bhaidasna on Mar 17, 2008 12:04 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can convert By UDF
assume a="2004-07-24 09:45:52.189";
import java.util.;java.sql.;java.text.*;
function myudf(String a,Container container)
{
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss.SSS");
java.util.Date date = sdf.parse(a);
java.sql.Timestamp timestamp = new java.sql.Timestamp(date.getTime());
return timestamp;
}
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.