---
title: "How to Merge Date and Time to Make TimeStamp"
description: "Merge Date and Time of Table columns into single value as Timestamp."
url: https://srinimf.com/2016/03/28/how-to-merge-date-and-time-with-timestamp-from-table-columns/
date: 2016-03-28
modified: 2026-10-10
author: "Srini"
image: https://i0.wp.com/srinimf.com/wp-content/uploads/2016/03/date-and-time-merging.jpg?fit=1200%2C900&ssl=1
categories: ["DB2 V11"]
tags: ["DB2 Timestamp merging DATE and TIME"]
type: post
lang: en
---

# How to Merge Date and Time to Make TimeStamp

Two [Table columns](https://srinimf.com/2014/03/14/db2-plan_table/) of [Date and Time](https://srinimf.com/2022/10/22/how-to-understand-db2-date-and-time-sql-queries/) you can merge as **Timestamp** using Timestamp **function** in DB2.

Related[SQL code -180 DATE, TIME, OR TIMESTAMP Value is Invalid](https://srinimf.com/2015/09/09/sql-code-180-date-time-or-timestamp-value-value-is-invalid/)

---

## DB2 Function to Merge [Date and Time](https://srinimf.com/2023/12/27/how-to-get-date-and-time-from-timestamp-in-db2/)

TIMESTAMP with a DATE column and a TIME column as arguments, Assume that table TABLEX contains a DATE column named DATECOL and a TIME column named TIMECOL.

Related[How to choose cleverly DATE,TIME OR TIMESTAMP for Table Columns](https://srinimf.com/2016/09/17/how-to-choose-cleverly-datetime-or-timestamp-for-table-columns/)

For some row in the table, assume that DATECOL represents 25 December 2008 and TIMECOL represents 17 hours, 12 minutes, and 30 seconds after midnight.

** The following function returns the value** ‘2008-12-25-17.12.30.000000’.

```
TIMESTAMP(DATECOL, TIMECOL)
```

Related Posts

- [How to Insert Values into Timestamp Column in DB2](https://srinimf.com/2017/10/05/db2-question-on-timestamp-function-points-you-need/)DateOctober 5, 2017
- [How to choose cleverly DATE,TIME OR TIMESTAMP for Table Columns](https://srinimf.com/2016/09/17/how-to-choose-cleverly-datetime-or-timestamp-for-table-columns/)DateSeptember 17, 2016
- [DB2 v10 Changes for Timestamp](https://srinimf.com/2010/03/27/db2-timestamp/)DateMarch 27, 2010

### Share this:

-
- [Tweet](https://twitter.com/share)
- [![](https://i0.wp.com/assets.pinterest.com/images/pidgets/pinit_fg_en_rect_gray_20.png)](https://www.pinterest.com/pin/create/link/?url=https%3A%2F%2Fsrinimf.com%2F2016%2F03%2F28%2Fhow-to-merge-date-and-time-with-timestamp-from-table-columns%2F&media=https%3A%2F%2Fi0.wp.com%2Fsrinimf.com%2Fwp-content%2Fuploads%2F2016%2F03%2Fdate-and-time-merging.jpg%3Ffit%3D1200%252C900%26ssl%3D1&description=How%20to%20Merge%20Date%20and%20Time%20to%20Make%20TimeStamp)
-
- [Share on Tumblr](https://www.tumblr.com/share)
- [Share on WhatsApp (Opens in new window) WhatsApp](https://srinimf.com/2016/03/28/how-to-merge-date-and-time-with-timestamp-from-table-columns/?share=jetpack-whatsapp)
- [More](#)
-

- [Print (Opens in new window) Print](https://srinimf.com/2016/03/28/how-to-merge-date-and-time-with-timestamp-from-table-columns/?share=print)
- [Share on Reddit (Opens in new window) Reddit](https://srinimf.com/2016/03/28/how-to-merge-date-and-time-with-timestamp-from-table-columns/?share=reddit)
- [Share on Telegram (Opens in new window) Telegram](https://srinimf.com/2016/03/28/how-to-merge-date-and-time-with-timestamp-from-table-columns/?share=telegram)
- [Email a link to a friend (Opens in new window) Email](mailto:?subject=%5BShared%20Post%5D%20How%20to%20Merge%20Date%20and%20Time%20to%20Make%20TimeStamp&body=https%3A%2F%2Fsrinimf.com%2F2016%2F03%2F28%2Fhow-to-merge-date-and-time-with-timestamp-from-table-columns%2F&share=email)
-

### Like this:

Like Loading…
