|
function getMonthName(month: Integer):
string;
const bob: array[1..12] of string = ('January','Febuary','...'); begin if (month < 1) or (month > 12) then raise Exception.Create('Bad date'); result := bob[month]; end; -----Original Message-----
From: Tracey Maule [mailto:[EMAIL PROTECTED] Sent: Thursday, 13 March 2003 1:09 p.m. To: Multiple recipients of list delphi Subject: [DUG]: increment month name? hi
Im creating an html report to show
monthly records for the next_12_months
i take a couple of queries, which are
bringing back records for a given month, starting with the current
month
sMonthName := FormatDateTime('mmmm', Date); //the name of the
month for display purposes (thanks again
ross)
iThisMonth := MonthOf(Date); //the number of the month for the querie's "extract(month from xx)" statement I fire one query, display the data, fire
the other, display the data, then i need to loop round and do it all again for
the next month.
so,.. i can easily increment the int
month value, what im having trouble with is the string
is there a function which will take an
int value and convert into a month
name? OR
is there some smooth way to add exactly
one month to Date() or Now()?
OR
am i going to have to do something
tricky?
|
- [DUG]: increment month name? Tracey Maule
- Re: [DUG]: increment month name? Jeremy North
- Re: [DUG]: increment month name? Tracey Maule
- RE: [DUG]: increment month name? James Low
- Re: [DUG]: increment month name? Tracey Maule
- RE: [DUG]: increment month name? Allan, Samuel
- RE: [DUG]: increment month name? James Low
