---
title: "TODATETIME"
description: "TODATETIME"
keywords: "TODATETIME"
url: "https://myrapidi.com/wiki/todatetime"
locale: "en"
published: "2009-05-15T09:56:38Z"
modified: "2012-11-08T07:42:36Z"
---

# TODATETIME(date, month, year, hour, minute, second);

Todatetime can be used if you need to transfer date, month, year, hour, minute and seconds to a single field in the destination.

&nbsp;

**Example:**

> You need to transfer all the above fields sDay,sMonth,SYear,sHour,sMinute,sSecond into one Datetimefield.
> 
> sDay=15  
> sMonth=05  
> sYear=2009
> 
> sHour = 12  
> sMinute= 44  
> sSecond= 23
> 
> &nbsp;
> 
> ##TODATETIME("sDay","sMonth","sYear","sHour","sMinute","sSecond")  
> Returns the value = 20090515 12:44:23 as a datetime.
> 
> &nbsp;
> 
> If that format does not match the date in the destination Data Base, you can add a FORMAT formula:
> 
> &nbsp;
> 
> ##FORMAT(TODATETIME("sDay","sMonth","sYear","sHour","sMinute","sSecond"),'%d-%m-y%:H%.M.%S')  
> Returns the value 2009-05-15:12.44.23

&nbsp;
