format_date_time()

Returns the date and time as a formatted string, does not add a new line, \n, at the end of the string.The formatting can be specified using a format string. This string and formatting rules are identical to the C language's strftime() function. Note, this function is sensitive to the LANG language environment variable and returns internationalized date and time strings based on this variable.

Syntax:

format_date_time(format_string);

where

format_string is identical to the format string accepted by the C library function strftime(). Each %c is replaced using values appropriate for the local environment). No more than smax characters are placed into s. The strftime() returns the number of characters, excluding the \0, or zero if more than smax characters were produced.

where
%a is the abbreviated weekday name
%A is the full weekday name
%b is the abbreviated month name
%B is the full month name
%c is the local date and time representation
%d is the day of the month (01-31)
%H is the hour (24-hour clock) (00-23)
%I is the hour (12-hour clock) (01-12)
%j is the day of the year (001-366)
%m is the month (01-12)
%M is the minute (00-59)
%p is the local equivalent of AM or PM
%S is the second (00-61)
%U is the week number of the year (Sunday as first day of week) (00-53)
%w is the weekday (0-6, Sunday is 0)
%W is the week number of the year (Monday as first day of week) (00-53)
%x is the local date representation
%X is the local time representation
%y is the year without century (00-99)
%Y is the year with century

Example:
decl datetime;
datetime = format_date_time("%a %B"); //prints "Weds July"

Where Used:

Measurement Expressions (Data Display equations and Schematic MeasEqns), Schematic, Layout, Simulation, GUI

 

Privacy Statement  | Terms of Use  | Legal | Contact Us  | © Agilent 2000-2008 

Contents
Additional Resources