View previous topic :: View next topic |
Author |
Message |
js01 Beginner
Joined: 13 Oct 2005 Posts: 84 Topics: 32 Location: INDIA
|
Posted: Thu Aug 31, 2006 5:42 pm Post subject: Convert INTEGER to TIMESTAMP |
|
|
Hi,
is there any function to convert integer to timestamp.
Please help me.
thank you |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Thu Aug 31, 2006 7:44 pm Post subject: |
|
|
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 |
|
 |
js01 Beginner
Joined: 13 Oct 2005 Posts: 84 Topics: 32 Location: INDIA
|
Posted: Thu Aug 31, 2006 8:24 pm Post subject: |
|
|
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 |
|
 |
coolman Intermediate
Joined: 03 Jan 2003 Posts: 283 Topics: 27 Location: US
|
Posted: Fri Sep 01, 2006 10:17 am Post subject: |
|
|
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 |
|
 |
js01 Beginner
Joined: 13 Oct 2005 Posts: 84 Topics: 32 Location: INDIA
|
Posted: Fri Sep 01, 2006 3:23 pm Post subject: |
|
|
Coolman,
No, i am not going to replace assembler..i want to get a record from DB2 and display correct value |
|
Back to top |
|
 |
coolman Intermediate
Joined: 03 Jan 2003 Posts: 283 Topics: 27 Location: US
|
Posted: Fri Sep 01, 2006 3:27 pm Post subject: |
|
|
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 |
|
 |
|
|