<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../style.css">
<title>
Gambas Documentation - Date
</title>
</head>
<table class="none" width="100%" cellpadding="0" cellspacing="0" border="0">
<tr><td align="left">
<font size="-1">
<a href="../../help+en"><img class="flag" alt="Home" border="0" src="../../img/lang/en.png" align="center"></a>&nbsp;
<a href="../lang+en">Up</a>&nbsp;
<a href="datarep+en">Previous</a>&nbsp;
<a href="dateadd+en">Next</a>&nbsp;
</td></tr></table>
<div class="notab">
<h1>
Date
</h1>
<div class="black"><font size="-2"><b>Syntax</b></font></div>
<pre class="syntax"><u>Result</u> <b>= Date (</b> <u>Expression</u> <b>)</b> AS Date</pre><p>

Returns the <a href="../comp/gb.eval/expression+en">Expression</a> as a date and time value
<p>
<div class="gray"><font size="-2"><b>Example</b></font></div>
<pre class="example">PRINT Now; &quot; -> &quot;; Date(Now)
<hr>05/16/2002 15:10:59 -> 05/16/2002</pre>
<p>
<h3>Alternative syntax</h3>
<p>
<div class="black"><font size="-2"><b>Syntax</b></font></div>
<pre class="syntax"><u>Date</u> <b>= Date (</b> <u>Year</u> <b>,</b> <u>Month</u> <b>,</b> <u>Day</u> [ <b>,</b> <u>Hours</u> <b>,</b> <u>Minutes</u> <b>,</b> <u>Seconds</u> ] <b>)</b> AS Date</pre><p>

Makes a date from its <a href="type/integer+en">Integer</a> components.
<p>
<div class="gray"><font size="-2"><b>Example</b></font></div>
<pre class="example">PRINT Date(1972, 09, 06, 1, 5, 17)
<hr>09/06/1972 01:05:17</pre>
<p>
<div class="gray"><font size="-2"><b>Example</b></font></div>
<pre class="example">PRINT Date(1972, 09, 06, 1, 5, 17)
PRINT CFloat(Date(1972, 09, 06, 1, 5, 17))
<hr>06.09.1972 01:05:17
2473671,04533565</pre>
<p>
<hr><b>See also</b><br>
<a href="../cat/time+en">Date &amp; Time Functions</a>&nbsp;

</div>
</body>
</html>

