MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Convert INTEGER to TIMESTAMP

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
js01
Beginner


Joined: 13 Oct 2005
Posts: 84
Topics: 32
Location: INDIA

PostPosted: Thu Aug 31, 2006 5:42 pm    Post subject: Convert INTEGER to TIMESTAMP Reply with quote

Hi,

is there any function to convert integer to timestamp.

Please help me.

thank you
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Thu Aug 31, 2006 7:44 pm    Post subject: Reply with quote

js01,

Integer is 4 byte field where as timestamp is 26 byte field which contains date and time with microseconds. I don't see the relation between these 2 formats. Show us example of input and desired output.

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
js01
Beginner


Joined: 13 Oct 2005
Posts: 84
Topics: 32
Location: INDIA

PostPosted: Thu Aug 31, 2006 8:24 pm    Post subject: Reply with quote

Koulu,

Thank you for your responce..

Actually in our shop time stapm is converting to integer and storing it in DB2 feild,
for this thay have used assembler.

ex:


2006.06.02.01403306 ==> input ot the pgm


546579675 ==.output

thank you
Back to top
View user's profile Send private message
coolman
Intermediate


Joined: 03 Jan 2003
Posts: 283
Topics: 27
Location: US

PostPosted: Fri Sep 01, 2006 10:17 am    Post subject: Reply with quote

js01 wrote:
Koulu,

Actually in our shop time stapm is converting to integer and storing it in DB2 feild,
for this thay have used assembler.
ex:


2006.06.02.01403306 ==> input ot the pgm


546579675 ==.output

thank you


So, are you trying to remove assembler that's used in your shop and trying to replace with a SQL?
________
Valium Rehab Forum


Last edited by coolman on Sat Mar 12, 2011 8:39 pm; edited 1 time in total
Back to top
View user's profile Send private message
js01
Beginner


Joined: 13 Oct 2005
Posts: 84
Topics: 32
Location: INDIA

PostPosted: Fri Sep 01, 2006 3:23 pm    Post subject: Reply with quote

Coolman,

No, i am not going to replace assembler..i want to get a record from DB2 and display correct value
Back to top
View user's profile Send private message
coolman
Intermediate


Joined: 03 Jan 2003
Posts: 283
Topics: 27
Location: US

PostPosted: Fri Sep 01, 2006 3:27 pm    Post subject: Reply with quote

js01,

What's the conversion mechanism? I understand that your i/p is the current timestamp and o/p is a number but how are you converting it?. If you need a SQL for it, you would have to post the conversion rules on how to do it. Your I/p and O/p doesn't mean anything on how the conversion should be done.
________
Fix Ps3
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group