[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
Function ddatetostr - convert a date to abbrev. string
Syntax char *ddatetostr(struct ddate *source);
Prototype in datehk.h
Remarks ddatetostr converts a date from the structure
format ddate to a string in the form mm-dd-y..y
where the month and day are always 2 digits long (a
0 is prefixed to single digit months and days) and
year is not altered.
Return value returns a pointer to the storage location
containing the date in string format, or NULL if
space could not be allocated.
See also Cal...(), date_convert(), ddatetofull(),
ddatetoshort(), ddatetostr(), fulltoddate(),
Greg...(), Jul...(), monthexpand(), shorttoddate(),
strtoddate()
Example #include <datehk.h>
main()
{
struct ddate today;
char *strtoday;
/* assign some value to today */
strtoday = ddatetostr(&today);
printf("today is %d-%d-%d\n", today.dmon,
today.dday, today.dyear);
printf("or %s\n", (strtoday==NULL) ?
"no memory" : strtoday);
}
See Also:
ddatetofull()
ddatetoshort()
fulltoddate()
shorttoddate()
strtoddate()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson