$FUNCNAME$
  CTOD()
$CATEGORY$
  DATE/TIME
$SUMMARY$
   Convert a date string to a date value
$LANG_RU$
     ,  ,    DATE.
$SYNTAX$
     CTOD(<cDate>) --> dDate
$LANG_RU$
     CTOD(<->) --> 
$ARGUMENTS$
     <cDate> is a character string consisting of numbers representing the
     month, day, and year separated by any character other than a number.
     The month, day, and year digits must be specified in accordance with the
     SET DATE format.  If the century digits are not specified, the century
     is determined by the rules of SET EPOCH.
$LANG_RU$
     <-> -  ,   , 
       ,   ,   , 
     . ,         
       SET DATE .    ,
      ,     SET EPOCH.
$RETURNS$
     CTOD() returns a date value.  If <cDate> is not a valid date, CTOD()
     returns an empty date.
$LANG_RU$
     CTOD()   .  <-> 
     , CTOD()   .
$DESCRIPTION$
     CTOD() is a character conversion function that converts a character
     string to a date.  To initialize an empty date for date entry, specify
     <cDate> as a null string (""), SPACE(8), or "  /  /  ".

     CTOD() is used whenever you need a literal date value.  Some examples
     are:

       Initializing a variable to a date value

       Specifying a literal date string as an argument of a RANGE
	clause of @...GET

       Specifying a literal date string in order to perform date
	arithmetic

       Comparing the result of a date expression to a literal date
	string

       REPLACEing a date field with a literal date string

     CTOD() is the inverse of DTOC() which converts a date value to a
     character string in the format specified by SET DATE and SET CENTURY.
     DTOS() also converts a date value to a character string in the form
     yyyymmdd.
$LANG_RU$
     CTOD() -     , 
         .    
       <->      
     (""),   SPACE(8),   "//".

     CTOD()  ,      
     . :

           

         ,   
         RANGE  @...GET

         ,  , 
           

             
        

             

      CTOD()     DTOC(), 
            
      ,   SET DATE  SET CENTURY.  DTOC()
             
       .
$EXAMPLES$
       This example uses CTOD() to initialize two date variables,
	using one as a GET and the other for RANGE validation:

	SET CENTURY ON
	dBegin := CTOD("01-26-1876")
	dCurrent := CTOD("")
	@ 10, 10 SAY "Enter date:" GET dCurrent ;
	      RANGE dBegin, DATE()
	READ

       This example uses CTOD() to create a date value within a FOR
	condition:

	USE Inventory NEW
	REPLACE ALL Inventory->Price WITH ;
	   Inventory->Price * 1.1 FOR ;
	   Inventory->InvDate < CTOD("10/10/90")
$LANG_RU$
          CTOD()    
         ,     GET,   - 
        RANGE:

       SET CENTURY ON
       dBegin = CTOD("01-26-1876")
       dCurrent = CTOD("")
       @ 10, 10 SAY " :" GET dCurrent RANGE dBegin, DATE()
       READ

         CTOD()     
              FOR:

       USE Inventory NEW
       REPLACE ALL Inventory->Price WITH Inventory->Price * 1.1;
	 FOR Inventory->InvDate < CTOD("10/10/90")
$SEEALSO$
  DATE(),DTOC(),DTOS()
$END$
