Einzelnen Beitrag anzeigen

hboy

Registriert seit: 16. Jan 2004
364 Beiträge
 
#4

Re: Monatskürzel "Jan".."Dec" in 01..12

  Alt 2. Feb 2004, 15:42
Delphi-Quellcode:
function monthbystr(s: string): integer;
const
  months = 'JAN FEB MAR APR MAY JUN JUL AUG SEP OCT NOV DEC';
var
  position: integer;
begin
  position:= Pos(Uppercase(s),months);
  if position = -1 then
    result := -1
  else
    result := position shr 2;
end;
und es is immer noch kurz
Power is nothing without TControl
  Mit Zitat antworten Zitat