if Condition then Statement else Statement;
var mda:string;
monthh: integer;
begin
monthh:=strtoint(formatdatetime('mm',datetimepicker1.Date));
if monthh=1 then
mda:='jan'
else if monthh=2 then
mda:='feb'
else if monthh=3 then
mda:='3'
else if monthh=4 then
mda:='4'
else if monthh=5 then
mda:='5'
else if monthh=6 then
mda:='6'
else if monthh=7 then
mda:='7'
else if monthh=8 then
mda:='8'
else if monthh=9 then
mda:='9'
else if monthh=10 then
mda:='10'
else if monthh=11 then
mda:='11'
else if monthh=12 then
mda:='12';
edit2.Clear;
edit2.Text:=mda;
end;
ตัวอย่างแก้อันนี้
http://hosxp.net/index.php?option=com_smf&Itemid=28&topic=20450.msg173998#new