French_Vanilla_Dotted_Date2SyntaxeFrench_Vanilla_Dotted_Date2(theDate) Retourne la date au format court Français. Le parametre est au format date, le résultat est au format texte. par Nigel Garvey. ExempleFrench_Vanilla_Dotted_Date2(current date) --> "16/10/03"
Scripton French_Vanilla_Dotted_Date2(the_date) copy the_date to new_date set month of new_date to January tell (((year of the_date) * 10000 + (new_date - 2500000 - the_date) ¬ div -2500000 * 100 + (day of the_date)) as string) to return ¬ text 7 thru 8 & "/" & text 5 thru 6 & "/" & text 3 thru 4 end French_Vanilla_Dotted_Date2
RemarquePour obtenir l'année entière, changer le dernier "text X thru Y" dans la dernière ligne : text 7 thru 8 & "/" & text 5 thru 6 & "/" & text 1 thru 4
Pour obtenir le format anglais (le mois avant le jour), intervertir les deux premiers "text X thru Y" : text 5 thru 6 & "/" & text 7 thru 8 & "/" & text 3 thru 4
|