microseconds format in timestamp

Hi

I need the timestamp format as [SIZE=2]
1900-01-01-00.00.00.000000. Last 6 digits are micro seconds.

To have the microseconds do i need to go for a java service or it can be achieved through flowservice?
Please suggest.

Thanks
Shyam
[/size]

Please refer to the pub.date services in the IS built-in services reference. You can also search for “Pattern String Symbols” in that document.

Mark

Use the pattern as “yyyy-MM-dd-hh.mm.ss.SSSSSS” to get your expected result.

I don’t think you can get microsecond using the built-in services. S represents milliseconds so if you use a pattern with SSSSSS, you will just end up with 3 zeroes and then your 3-digit milliseconds.

If you trully need that much precision in your timestamp, you’ll probably have to do some coding.

  • Percio

S stands for milliseconds and if i use the above format i will get the coverted milliseconds to microsecond but not actual microseconds…

i mean for 210 milliseconds i will get 000210 microseconds…mathematically which is correct but the requirment here is i need the actual microseconds starting from 0.

Hope u understand the problem…
Please suggest

Thanks
Shyam

Where is the time reading coming from? You’re not going to get a microseconds reading from any of today’s OS/hardware combinations. Milliseconds is likely the highest resolution you’ll be able to achieve and most likely the best accuracy will be something like 20 milliseconds, depending on hardware, OS and JVM.

[URL]Categories

While Java 1.5 introduced the nanoTime() method, it can be used to measure elapsed time, not determine current time of day.

I imagine it was a typo but 210 milliseconds is not 000210 microseconds. It is 210000.

What sort of integration are you working on? It seems odd to me that time accuracy to the microsecond is a necessary for a business integration.

Thanks all for ur valuable suggestions… may be will stick for milliseconds precision.