SET EPOCH

SET EPOCH

Specify a base year for interpreting dates

Syntax

      SET EPOCH TO <nEpoch>

Arguments

<nEpoch> Base Century.

Description

This command sets the base year value for dates that have only two digits. The default setting is 1900. Dates between 0100-01-01 and 2999-12-31 are fully supported.

Examples

      SET EPOCH TO 2000

Compliance

Clipper

Seealso

SET DATE, SET CENTURY, CToD(), Date(), DToC(), Set()

Advertisements

SET DATE

SET DATE

Assigns a date format or chooses a predefined date data set.

Syntax

      SET DATE FORMAT [TO] <cFormat>

      SET DATE [TO] [ANSI / BRITISH / FRENCH / GERMAN 
      / ITALIAN / JAPAN / USA / AMERICAN]

Arguments

<cFormat> Keyword for date format

Description

This command sets the date format for function display purposes. If specified, <cFormat> may be a customized date format in which the letters d, m and y may be used to design a date format. The default is an AMERICAN date format; specifying no parameters will set the date format to AMERICAN. Below is a table of the various predefined dates formats.

       Syntax         Date Format
       ------------   -----------  
       ANSI           yy.mm.dd
       BRITISH        dd/mm/yy
       FRENCH         dd/mm/yy
       GERMAN         dd.mm.yy
       ITALIAN        dd-mm-yy
       JAPAN          yy.mm.dd
       USA            mm-dd-yy
       AMERICAN       mm/dd/yy

Examples

      SET DATE JAPAN
      ? Date()
      SET DATE GERMAN
      ? Date()

Compliance

Clipper

Seealso

SET DATE, SET EPOCH, CToD(), Date(), DToC(), Set()

SET CENTURY

SET CENTURY

Toggle the century digits in all dates display

Syntax

      SET CENTURY on | OFF | (<lCent>)

Arguments

<lCent> Logical expression for toggle

Description

This command allows the input and display of dates with the century prefix. It will be in the standart MM/DD/YYYY format unless specified by the SET DATE command or Set() function. If <lCent> is a logical true (.T.), the command will be set on; otherwise, the command will be set off

Examples

      SET CENTURY ON
      ? Date()
      SET CENTURY OFF

Compliance

Clipper

Seealso

SET DATE, SET EPOCH, CToD(), Date(), DToC(), Set()

DToC()

DTOC()

Date to character conversion

Syntax

      DTOC(<dDateString>)  --> cDate

Arguments

<dDateString> Any date

Returns

<dDate> Character represention of date

Description

This function converts any date expression (a field or variable) expressed as <dDateString> to a character expression in the default format “MM/DD/YY”. The date format expressed by this function is controled in part by the date format specified in the SET DATE command

Examples

      ? DToC( Date() )

Compliance

Clipper

Platforms

All

Files

Library is rtl

Seealso

SET DATE, DATE(), DTOS()

CToD()

 

CTOD()

Converts a character string to a date expression

Syntax

      CTOD(<cDateString>)  --> dDate

Arguments

<cDateString> A character date in format ‘mm/dd/yy’

Returns

<dDate> A date expression

Description

This function converts a date that has been entered as a character expression to a date expression. The character expression will be in the form “MM/DD/YY” (based on the default value in SET DATE) or in the appropriate format specified by the SET DATE TO command. If an improper character string is passed to the function, an empty date value will be returned.

Examples

      ? CToD( "12/21/00" )

Compliance

Clipper

Platforms

All

Files

Library is rtl

Seealso

SET DATE, DATE(), DTOS()

SP_SET_DATE

SET_DATE()

  Short:
  ------
  SET_DATE() Sets and restores date format

  Returns:
  --------
  <nFormat> => previous SET DATE format 1-5

  Syntax:
  -------
  SET_DATE([nFormatNew])

  Description:
  ------------
  Return current SET DATE setting <nFormat> and
  optionally set to new format [nFormatNew]

  [nFormatNew] =    1  American
                    2  British/French
                    3  German
                    4  ANSI
                    5  Italian

  Examples:
  ---------
   nOldformat := SET_DATE(5)

   ** SET TO ITALIAN

   * code

   * more code

   SET_DATE(nOldformat)   // restore to prior setting

  Source:
  -------
  S_SETDAT.PRG

 

C5 UI Global Settings

C5 User Interface Global Settings :

SET CENTURY :

Modify the date format to include or omit century digits

SET CENTURY on | OFF | <xlToggle>

SET COLOR* :

Define screen colors

SET COLOR | COLOUR TO [[<standard>]
    [,<enhanced>] [,<border>] [,<background>]
    [,<unselected>]] | (<cColorString>)

SET CONFIRM :

Toggle required exit key to terminate GETs

SET CONFIRM on | OFF | <xlToggle>

SET CONSOLE :

Toggle console display to the screen

SET CONSOLE ON | off | <xlToggle>

SET CURSOR :

Toggle the screen cursor on or off

SET CURSOR ON | off | <xlToggle>

SET DATE :

Set the date format for input and display

SET DATE FORMAT [TO] <cDateFormat>
SET DATE [TO] AMERICAN | ansi | british | french
    | german | italian | japan | usa

SET DECIMALS :

Set the number of decimal places displayed

SET DECIMALS TO [<nDecimals>]

SET DELIMITERS :

Toggle or define GET delimiters

SET DELIMITERS on | OFF | <xlToggle>
SET DELIMITERS TO [<cDelimiters> | DEFAULT]

SET DEVICE :

Direct @…SAYs to the screen or printer

SET DEVICE TO SCREEN | printer

SET EPOCH :

Control the interpretation of dates with no century digits

SET EPOCH TO <nYear>

SET FIXED :

Toggle fixing of the number of decimal digits displayed

SET FIXED on | OFF | <xlToggle>

SETBLINK() :

Toggle asterisk (*) interpretation in SET COLOR

SETBLINK([<lToggle>]) --> lCurrentSetting

SETCOLOR() :

Return the current colors and optionally set new colors

SETCOLOR([<cColorString>]) --> cColorString

SETCURSOR() :

Set the cursor shape

SETCURSOR([<nCursorShape>]) --> nCurrentSetting

SETMODE() :

Change display mode to specified number of rows and columns

SETMODE(<nRows>, <nCols>) --> lSuccess

SETPOS() :

Move the cursor to a new position

SETPOS(<nRow>, <nCol>) --> NIL