MAINSAIL Language Manual, Section 33.7

previous   next   top   contents   index   framed top   this page unframed


33.7. $dateAndTimeToStr

Figure 33–7. $dateAndTimeToStr
STRING
PROCEDURE   $dateAndTimeToStr
                        (
LONG INTEGER date,time;
                         
OPTIONAL BITS ctrlBits;
                         
PRODUCES OPTIONAL STRING
                             
dateStr,timeStr,zoneStr;
                         
OPTIONAL POINTER($areastrArea;
                         
OPTIONAL LONG BITS ctrlBits2);

$dateAndTimeToStr converts a MAINSAIL date and time to a STRING. date and time may be in local time, GMT time, or time difference format. By default, a local time STRING is returned.

If ctrlBits is not specified, the output format of $dateAndTimeToStr is the same as the output formats of $dateToStr and $timeToStr, separated by a space; e.g.:

$dateAndTimeToStr(d,t) = $dateToStr(d) & " " & $timeToStr(t)

except that if a time zone name appears in the STRING, $dateAndTimeToStr appends it only once to the end of the STRING, or if a plus or minus precedes a time difference STRING, it is included in the STRING only once.

dateStr, timeStr, and zoneStr are the date, time, and time zone name substrings, respectively, of the returned STRING. Some settings of ctrlBits may cause dateStr and timeStr to be different from those that would be returned by $dateToStr and $timeToStr, and these STRINGs may not be correctly parsed if passed to $strToDate or $strToTime.

ctrlBits and ctrlBits2 bits valid for $dateToStr and $timeToStr are also valid for $dateAndTimeToStr, with the same effects. In addition, $localTime and $gmt may be specified in ctrlBits. If $localTime or $gmt is specified, a local time or GMT STRING is returned, respectively. The caveats described in Section 24.3 regarding conversion between local time and GMT apply if date and time are in local format and $gmt is set or vice versa.


previous   next   top   contents   index   framed top   this page unframed

MAINSAIL Language Manual, Section 33.7