Webcam32 Time Codes

Webcam32 uses codes to represent time formats.  These codes may be included in a caption string or in the file name for Local Image Save.  The following codes are defined for Webcam32:

Code Description
%a Abbreviated weekday name
%A Full weekday name
%b Abbreviated month name
%B Full month name
%c Date and time representation appropriate for locale
%d Day of month as decimal number (01 – 31)
%H Hour in 24-hour format (00 – 23)
%I Hour in 12-hour format (01 – 12)
%j Day of year as decimal number (001 – 366)
%m Month as decimal number (01 – 12)
%M Minute as decimal number (00 – 59)
%p Current locale’s A.M./P.M. indicator for 12-hour clock
%S Second as decimal number (00 – 59)
%U Week of year as decimal number, with Sunday as first day of week (00 – 51)
%w Weekday as decimal number (0 – 6; Sunday is 0)
%W Week of year as decimal number, with Monday as first day of week (00 – 51)
%x Date representation for current locale
%X Time representation for current locale
%y Year without century, as decimal number (00 – 99)
%Y Year with century, as decimal number
%z, %Z Time-zone name or abbreviation; no characters if time zone is unknown
%% Percent sign

The following shows some examples of output for these codes for 6:15 pm, Wednesday December 17th

Code Example Output
%a Wed
%A Wednesday
%b Dec
%B December
%c 12/17/97 18:15:00
%d 17
%H 18
%I 06
%j 351
%m 12
%M 15
%p PM
%S 00
%U 50
%w 3
%W 50
%x 12/17/97
%X 18:15:00
%y 97
%Y 1997
%z, %Z Central Standard Time
%% %



Examples of use

If the caption were set to the text:

Hello from Webcam32 %c is the time

The output caption would read

Hello from Webcam32 12/17/97 18:15:00 is the time


Codes may be strung together to achieve a combined or custom date and time format:

Hello from Webcam32; today is %A %B the %dth

Would generate:

Hello from Webcam32; today is Wednesday December the 17th


If the Local Image Save output filename includes time formatting codes and the time based name option has been selected, Webcam32 will save the names with expanded time formatting codes.  The codes %c, %x, %X, %z and %Z should not be used as these can generate characters which would result in invalid file names.

If the Local Image Save file name were set to:

Webcam%H%M%S

The resulting file would be called

Webcam181500.jpg

« Previous page