---
title: "TODATE"
description: "TODATE"
keywords: "TODATE"
url: "https://myrapidi.com/wiki/todate"
locale: "en"
published: "2009-05-15T09:53:26Z"
modified: "2012-11-08T07:38:53Z"
---

# TODATE(date, month, year);

The function Todate can be used if you want to transfer date, month and year to a single field in the destination.

&nbsp;

**Example:**

> Source holds day, month and year in separate fields which needs to be transferred into a Date field in the destination:
> 
> &nbsp;
> 
> sDay=15  
> sMonth=05  
> sYear=2009
> 
> &nbsp;
> 
> ##TODATE("sDay","sMonth","sYear")  
> Returns the value = 15-05-2009.
> 
> &nbsp;
> 
> If that format does not match date in the destination Data Base you can add a FORMAT formula:
> 
> &nbsp;
> 
> &nbsp;##FORMAT(TODATE"sDay","sMonth","sYear"),'%Y%m%d')  
> Returns the value = 20090515.
> 
> &nbsp;
> 
> If you need a specific separator you can add that in the formula:
> 
> &nbsp;
> 
> ##FORMAT(TODATE("sDay","sMonth","sYear"),'%Y-%m-%d')  
> Returns the value = 2009-05-15.
> 
> &nbsp;
> 
> You can have year into digits (o3) by using y instead of Y:
> 
> ##FORMAT(TODATE("sDay","sMonth","sYear"),'%y-%m-%d')  
> Returns the value: 09-05-15
