<turbo-stream action="update" target="wiki_99_subpage_173_info"><template>
<h1>TODATE(date, month, year);</h1>
<p>The function Todate can be used if you want to transfer date, month and year to a single field in the destination.</p>
<p>&nbsp;</p>
<p><strong>Example:</strong></p>
<blockquote>
<p>Source holds day, month and year in separate fields which needs to be transferred into a Date field in the destination:</p>
<p>&nbsp;</p>
<p>sDay=15<br>sMonth=05<br>sYear=2009</p>
<p>&nbsp;</p>
<p>##TODATE("sDay","sMonth","sYear")<br>Returns the value = 15-05-2009.</p>
<p>&nbsp;</p>
<p>If that format does not match date in the destination Data Base you can add a FORMAT formula:</p>
<p>&nbsp;</p>
<p>&nbsp;##FORMAT(TODATE"sDay","sMonth","sYear"),'%Y%m%d')<br>Returns the value = 20090515.</p>
<p>&nbsp;</p>
<p>If you need a specific separator you can add that in the formula:</p>
<p>&nbsp;</p>
<p>##FORMAT(TODATE("sDay","sMonth","sYear"),'%Y-%m-%d')<br>Returns the value = 2009-05-15.</p>
<p>&nbsp;</p>
<p>You can have year into digits (o3) by using y instead of Y:</p>
<p><br>##FORMAT(TODATE("sDay","sMonth","sYear"),'%y-%m-%d')<br>Returns the value: 09-05-15</p>
</blockquote>
</template></turbo-stream>
<turbo-stream action="prepend" target="flash"><template></template></turbo-stream>
