IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Hi All, How to truncate the Microsecond from the Time


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ramfrom84

New User


Joined: 23 Aug 2006
Posts: 93
Location: chennai

PostPosted: Mon Oct 16, 2006 5:52 pm
Reply with quote

Hi All,
I want to truncate the Micro second from the Time Format.

My Input Time Format is 00:20:02.23232 (HH:MM:SS.microsecond)
output File should contain 00:20:02 (HH:MM:SS)

Anyboby knows Please help
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Mon Oct 16, 2006 6:05 pm
Reply with quote

In REXX? Any one of the functions:

LEFT
PARSE
SUBSTR

If would think that the LEFT function would be the most straightforward:

hhmmss = LEFT(input_time,8)
Back to top
View user's profile Send private message
ramfrom84

New User


Joined: 23 Aug 2006
Posts: 93
Location: chennai

PostPosted: Mon Oct 16, 2006 6:19 pm
Reply with quote

Thanks ,
One more Question.

If my Time Format is not fixed length,
for example
1)2:00:01.34343
2)22:00:01.54545

In these case how will it works
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Mon Oct 16, 2006 6:24 pm
Reply with quote

You can use PARSE, SUBSTR or POS.

O.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts To get the the current time DFSORT/ICETOOL 13
No new posts RC query -Time column CA Products 3
No new posts C Compile time time stamps Java & MQSeries 10
No new posts Parallelization in CICS to reduce res... CICS 4
No new posts Insert system time/date (timestamp) u... DFSORT/ICETOOL 5
Search our Forums:

Back to Top