0 Members and 1 Guest are viewing this topic.
function dayofweek(day: string): byte; begin result := 0; case day of 'Mon': result := 1; 'Tue': result := 2; 'Wed': result := 3; 'Thu': result := 4; 'Fri': result := 5; 'Sat': result := 6; 'Sun': result := 7; end; end;{calling this function by:today := dayofweek(formatdate('ddd'));}
Quote from: miketh2005 on July 10, 2009, 07:31:20 pmDonate to enesceHAHAHAHAHAHAHA
Donate to enesce
maybe there's some function to check what language has the computer
It's not necessary, it's just a matter of day names I put into 'case day of', but it doesn't work all the time (for example, Polish Wednesday is Środa, and that character is unreadable by scripting engine). I am looking for a function that wouldn't use day names for that.
s : string;s := #346+'roda';
edit:click
FormatDate('d');// 1000 times easier <.<
or just do:Code: [Select]FormatDate('d');// 1000 times easier <.<