View previous topic :: View next topic
|
Author |
Message |
bipinpeter
Active User
Joined: 18 Jun 2007 Posts: 213 Location: Cochin/Kerala/India
|
|
|
|
Hi,
Please let me know the query to get the timestamp without microseconds part.
Select *
from table 1
where timestamp = (
select max(timestamp)
from table 1
where condition1)) |
|
Back to top |
|
|
Ketan Varhade
Active User
Joined: 29 Jun 2009 Posts: 197 Location: Mumbai
|
|
|
|
When you fetch it then you can trim it or use SUBSTR |
|
Back to top |
|
|
GuyC
Senior Member
Joined: 11 Aug 2009 Posts: 1281 Location: Belgium
|
|
|
|
depends on the actual requirement :
Code: |
select
current_timestamp - microsecond(current_timestamp) microseconds
,substr(char(current_timestamp),1,19)
from sysibm.sysdummy1 |
1st : rounded down to the second still type = TimeStamp
2nd : substr ( like ketan said) |
|
Back to top |
|
|
|