bonjour
j'ai créer une table notes, qui est composée des champs N° étudiant, n) matière, note), le champ note est du format 0.00, mais je ne sais pas comment créer ce format dans delphi
aidez moi s'il vous plait, merci
bonjour
j'ai créer une table notes, qui est composée des champs N° étudiant, n) matière, note), le champ note est du format 0.00, mais je ne sais pas comment créer ce format dans delphi
aidez moi s'il vous plait, merci
tu passes les paramétres sous forme de string que tu peux coder avec une fonction style :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14 Function sFloatToStr(rIn : extended;iSize :Integer =0;iPrec :Integer =2) :String; var iTemp :Integer; sTemp:String; begin iTemp:= round(rIn*100); sTemp:= IntToStr(iTemp); if rIn <0 then sTemp:= copy(sTemp,2,length(sTemp)); if length(sTemp)=1 then sTemp:= '0'+sTemp; if length(sTemp)=2 then sTemp:= '0'+sTemp; result:= copy(sTemp,1,length(sTemp)-2)+'.'+copy(sTemp,length(sTemp)-1,2); if rIn <0 then result:= '-'+Result; end;
merci beaucoup, et![]()
Partager