ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   DB2 timestamp format (https://www.excelbanter.com/excel-programming/411222-db2-timestamp-format.html)

Stan

DB2 timestamp format
 
Can Excel calculate date/time difference with data in DB2 timestamp format?
DB2's timestamp format is yyyy-mm-dd-hh.mm.ss.mmmmmm. i could probably write
some code but i was hoping not to.

joel

DB2 timestamp format
 
Are both dates dates serial dates (Numbers) or strings? If they are both
numbers then you should be able to compare the number. If they are strings
then you need to convert using datavalue

MyDate = DateValue("2008-05-20 12.01.23")

You will have to replace the dash between the date and time with a blank a
remove the 6 digits at the end

D2Time = "yyyy-mm-dd-hh.mm.ss.mmmmmm"
D2Time = Left(D2Time, 10) & " " & Mid(D2Time, 12, 8)

MyDate = DateValue(D2Time)


"Stan" wrote:

Can Excel calculate date/time difference with data in DB2 timestamp format?
DB2's timestamp format is yyyy-mm-dd-hh.mm.ss.mmmmmm. i could probably write
some code but i was hoping not to.


Philip Wright

DB2 timestamp format
 
Stan wrote:
Can Excel calculate date/time difference with data in DB2 timestamp format?
DB2's timestamp format is yyyy-mm-dd-hh.mm.ss.mmmmmm. i could probably write
some code but i was hoping not to.


Hi Stan,

You can do all kinds of timestamp math on the server side. See
http://www.ibm.com/developerworks/db.../0211yip3.html

-Philip


All times are GMT +1. The time now is 12:32 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com