SW006014 Microchip Technology, SW006014 Datasheet - Page 147

C COMPILER MPLAB FOR PIC24 MCU

SW006014

Manufacturer Part Number
SW006014
Description
C COMPILER MPLAB FOR PIC24 MCU
Manufacturer
Microchip Technology
Type
MPLAB® C Compilerr
Series
PIC24r
Datasheet

Specifications of SW006014

Supported Families
PIC24
Core Architecture
PIC
Kit Contents
Software And Docs
Mcu Supported Families
PIC24
Tool Function
Compiler
Tool Type
Compiler
Processor Series
PIC24
Lead Free Status / RoHS Status
Not applicable / Not applicable
For Use With/related Products
PIC24
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
© 2008 Microchip Technology Inc.
strftime (Continued)
Example:
%I
%j
%m month of the year (01-12)
%M minute of the hour (00-59)
%p
%S second of the minute (00-61)
allowing for up to two leap seconds
%U week number of the year where Sunday is the first day of week 1
(00-53)
%w weekday where Sunday is day 0 (0-6)
%W week number of the year where Monday is the first day of week 1
(00-53)
%x
%X appropriate time representation
%y
%Y
%Z
unavailable
%% percent character %
#include <time.h>
#include <stdio.h> /* for printf
int main(void)
{
}
Output:
It was a Monday, 20 days into the month of October in
the year 2003.
It was 42 weeks into the year or 293 days into the
year.
strftime(buf, 128, "It was a %A, %d days into the "
strftime(buf, 128, "It was %W weeks into the year "
time_t timer, whattime;
struct tm *newtime;
char buf[128];
timer = 1066668182; /* Mon Oct 20 16:43:02 2003 */
/* localtime allocates space for structure */
newtime = localtime(&timer);
printf(buf);
printf(buf);
hour of the day (01-12)
day of the year (001-366)
appropriate date representation
year without century (00-99)
AM/PM designator
time zone (possibly abbreviated) or no characters if time zone is
year with century
"month of %B in the year %Y.\n", newtime);
"or %j days into the year.\n", newtime);
/* for strftime, */
/* localtime,
/* time_t, tm
*/
*/
*/
DS51456E-page 143

Related parts for SW006014