[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
Function ddatetoshort - convert a date to short string
Syntax char *ddatetoshort(struct ddate *source);
Prototype in datehk.h
Remarks ddatetoshort converts a date from the structure
format ddate to a string in the form
Mon dd, Year where
Mon = the abbreviation of the month ("Nov")
dd = the day (5, 12, etc.)
Year = the year + 1900
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(),
ddatetostr(), fulltoddate(), Greg...(), Jul...(),
monthexpand(), shorttoddate(), strtoddate()
Example #include <datehk.h>
main()
{
struct ddate today;
char *strtoday;
/* assign some value to today */
strtoday = ddatetoshort(&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()
ddatetostr()
fulltoddate()
shorttoddate()
strtoddate()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson