Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding and Subtracting Time Stamps in Military Time

Status
Not open for further replies.

couchman02

Programmer
May 29, 2001
7
US
Rookie programmer here, I'm pulling a file that includes time stamps of when a customer logs on and off each day, I'm trying to get a total for each customer each day. The stamp is in military time. Is there a function I could use to convert it so I can add them? I know I'm not the first person to encounter this I'm just trying to keep down my total lines of code. Any suggestions/response highly appreciated.

pic x(08) 07:10:55
 
Hi Cman,

Two things: what's your environment (compiler lvl, opsys, hdware, etc).
Are you using DB2?

Jack
 
Thanks for reply Slade,
I'm using Cobol 370 on the mainframe as the compiler and I'm not using Db2. It's just a file coming down from Stratus/V.O.S server thats being sent to a flat file on the mainframe.
 
Couchman,

not being a military man: what does military time look like ?

Regards,
Ronald.
 
Hi Ron,

It's obvious you don't watch JAG. The current time is 1600 Zulu. That's 4:00PM to you non-JAGers.

Regards, Jack

My current & future apologies - I know you prefer Ronald, but I'm lazy. Have mercy.
 
Well guys you can scratch my original question I think I got it figured out and sorry it was a vague description on military time it's really Zulu (thanks slade).
 
Couchman,

many times, explaining your problem to someone else is enough to give yourself the insight you need to solve it. So: your welcome !

Jack,

"Ron" is fine; you're no lazier than many of the people i know. And, Zulu time means 24 hour notation, but without the colon. Okay, got that ! (And no, i hardly watch JAG; must have missed the Zulu bit).

Regards,
Ronald.
 
Hi Cman,

Sorry for the lateness, but I nosed around and couldn't find any specific T/S math functions. Strange that they have them for date but not time. Too bad you're not using DB2, it has a T/S arith function.

Regard, Jack.
 
No prob Slade, I appreciate your guys responses anyway. I just ended up writing a routine for it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top