<html>
<head>
<link href="mmres://user_interface_reference.css" rel="stylesheet" type="text/css">
<title>WEEK</title>
</head>
<body bgcolor="#FFFFFF" text="#000000">
   <div id="Description">
   <table cellpadding="0" cellspacing="0" border="0" width="100%" class="main">
      <tr> 
         <td valign="top" class="name">WEEK</td>
         <td valign="top" nowrap class="compatibility">&nbsp;</td>
      </tr>
      <tr>
         <td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
      </tr>


    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">Description</span>
<p>
From a date/time object, determines the week number within the year.
</p>
    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">Returns</span>
<p>
An integer in the range 1-53; the ordinal of the week, within the year.
</p>
    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">Category</span>
<p>
Date and time functions
</p>
    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">Function syntax</span><pre>Week(date)
</pre>    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">See also</span>
<p>
DatePart
</p>
    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">Parameters</span>
<p>

</p>
    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">Usage</span>
<p>
When passing date as a string, enclose it in quotation marks. Otherwise, it is interpreted as a number representation of a date.
</p>
    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">Example</span><pre>&lt;h3&gt;Week Example&lt;/h3&gt;
&lt;cfif IsDefined(&quot;FORM.year&quot;)&gt;
More information about your date:
&lt;cfset yourDate = CreateDate(FORM.year, FORM.month, FORM.day)&gt;
&lt;cfoutput&gt;
   &lt;p&gt;Your date, #DateFormat(yourDate)#.
   &lt;br&gt;It is #DayOfWeekAsString(DayOfWeek(yourDate))#, day
       #DayOfWeek(yourDate)# in the week.
   &lt;br&gt;This is day #Day(YourDate)# in the month of
       #MonthAsString(Month(yourDate))#, which has #DaysInMonth(yourDate)# days.
   &lt;br&gt;We are in week #Week(yourDate)# of #Year(yourDate)# (day
       #DayOfYear(yourDate)# of #DaysInYear(yourDate)#). &lt;br&gt;
   &lt;cfif IsLeapYear(Year(yourDate))&gt;This is a leap year
      &lt;cfelse&gt;This is not a leap year
   &lt;/cfif&gt;
&lt;/cfoutput&gt;
&lt;/cfif&gt;
</pre>
         </td>
      </tr>
   </table>
   </div>
<div id="DATE">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>  
<td valign="top" class="name">DATE</td>
  <td valign="top" nowrap class="compatibility">&nbsp;</td>
  </tr>
  <tr>
  <td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
  </tr>


<p>A date/time object in the range 100 AD-9999 AD.</p>

  </td>
  </tr>
  </table>
</div>

  </body>
</html>
