RE: Timestamp conversion

RE: Timestamp conversion

 

  

Well, no, any table!
You can select the timestamp field from some table
select MyStamp from MyTable;
or you can select the date from that same table
select date(MyStamp) from MyTable.
Similarly, if you want to insert a timestamp from a date and a time, use
the Timestamp() function:
insert into MyTable (MyTimestamp) values (timestamp(MyDate,
MyTime))
along with other fields, of course.

Rob.


-----Original Message-----
From: Edwards Ed
[mailto:db2udbdba-ezmlmshield-x2951618.[Email address protected]
Sent: dinsdag 26 april 2005 12:59
To: LazyDBA Discussion
Subject: RE: Timestamp conversion

Is it sysdummy1?


-----Original Message-----
From: Jitendra Kumar
[mailto:db2udbdba-ezmlmshield-x35435046.[Email address protected]
Sent: Tuesday, April 26, 2005 2:12 AM
To: LazyDBA Discussion
Subject: RE: Timestamp conversion


Try it,

select date('2005-04-22 11:50:48') from sysibm.sysdumm1;

or

select date(colname) from table_name;

with regards,
Jitendra Kumar


-----Original Message-----
From: Sheth Jignesh
[mailto:db2udbdba-ezmlmshield-x10646643.[Email address protected]
Sent: Monday, April 25, 2005 10:10 PM
To: LazyDBA Discussion
Subject: Timestamp conversion


Hi,

I have a timestamp field which returns the value as 2005-04-22 11:50:48
I need the value to be converted to date field like 2005-04-22 Is there
any db2 function I can use for that ???


Thanks.


---------------------------------------------------------------------
PLEASE CLICK REPLY-ALL TO SEND A REPLY TO EVERYONE
website: http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html




---------------------------------------------------------------------
PLEASE CLICK REPLY-ALL TO SEND A REPLY TO EVERYONE
website: http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html


DB2 & UDB email list listserv db2-l LazyDBA home page