strftime

Format: strftime( [ format, ] time )

Purpose: Format a time value. The format parameter must denote a string. If the format parameter is not given, it defaults to "%c". The time parameter must denote an object containing the broken down time as returned by localtime() or gmtime(). The structure of a broken down time object is described in localtime().

Return Values: Returns a string that is the result of formatting the time parameter with the format parameter.

The format string consists of zero or more conversion specifications and ordinary characters. A conversion specification consists of a '%' (percent) character followed by a character that determines the specification's behavior. Ordinary characters are copied unchanged into the result string. Each conversion specification is replaced by appropriate characters as described in the following list.

conversionreplacement
%%percent character
%aabbreviated weekday name
%Afull weekday name
%babbreviated month name
%Bfull month name
%cdefault date and time representation
%dday of month, two digits 01-31
%Hhour, two digits 00-23
%Ihour, two digits 01-12
%jday of the year, three digits 001-366
%mmonth number, two digits 01,12
%Mminute, two digits 00-59
%pa.m. or p.m. designation of the 12-hour clock
%Ssecond, two digits 00-61.
%Uweek number of the year (the first Sunday as the first day of week 1), two digits 00-53
%wweekday number, 0-6, Sunday is 0
%Wweek number of the year (the first Monday as the first day of week 1), two digits 00-53
%xdefault date representation
%Xdefault time representation
%yyear within century, two digits 00-2004
%Yyear with century
%Ztime zone name or abbreviation, or nothing if time zone is unknown

Example:

input:resulting output:
<? strftime ("%A %b %d %j %H:%M", localtime(caltime()))>Tuesday Jun 27 178 17:56
<? strftime ("%A %b %d %j %H:%M", gmtime(caltime()))>Tuesday Jun 27 178 15:56

Note: Internationalization support is planned for the next major revision of heitml.

See Also: caltime(), difftime(), gmtime(), localtime() mktime(), strptime().


This page was dynamically generated by the web application development tool RADpage of H.E.I.
© 1996-2017 H.E.I. All Rights Reserved.



Homepage
Intro/Features
Component Guide
Programming
  Language Guide
  Language Ref.
    General Design
    Lexical Structure
    Expressions
    Objects
    Methods
    Classes
    heitml Tags
    heitml Functions
      ArAppend
      ArConcat
      ArSearch
      array
      asc
      caltime
      chr
      class
      clone
      contains
      ContainsCase
      copy
      copyfile
      crypt
      _dbcolumns
      _dbforeignkey
      _dbprimarykey
      _dbtables
      _dbtypes
      default
      deletefile
      difftime
      directory
      findex
      flush
      fname
      gmtime
      htmlbool
      http_content_type
      http_empty_document
      http_expires
      http_header
      http_last_modified
      http_location
      http_set_cookie
      http_request_header
      _includefilepreprocessed
      index
      IndexCase
      integer
      isbool
      isdecl
      isempty
      isinteger
      isnull
      isstring
      istuple
      isreal
      left
      len
      localtime
      MD5
      mkdir
      mktime
      movefile
      offstotabcol
      random
      readFileLines
      _readini
      _readodbcdrv
      _readodbcdsn
      real
      resize
      right
      _serverdocroot
      _shelltemp
      srandom
      splitstring
      stat
      strftime
      strptime
      subst
      substall
      substring
      tabcoltooffs
      tolower
      toupper
      trim
      trimleft
      trimright
      TuAppField
      TuAssField
      TuAssign
      TuSlice
      TuDelField
      TuFieldSort
      TuInsField
      TuMerge
      TuName
      TuProject
      utime
      _writeini
    Advanced Functions
    Database Access
    Global Variables
    Form Fields
    Server Variables
    Sessions
    heitml Syntax
  Component Ref.
  Class Library
  User Components
  Tryout Form
  Tutorial
  New Features
  heitml 1
User Guide
FAQ
Mailinglist
Discussion Group
Services
Pricing/Register
Download
Frame
 
Contact
 
 
 
Search: