Petit coup de main en delphi

BomberJack Messages postés 247 Statut Membre -  
samiechikh Messages postés 10 Date d'inscription   Statut Membre Dernière intervention   -
Bonjour,
Voila, jais un petit problème avec mon code en delphi, je cherche a faire un tchat et un bot...voila le problème :
procedure TForm1.ServerSocket1ClientRead(Sender: TObject;
Socket: TCustomWinSocket);
var i:integer;
begin
for i:=0 to ServerSocket1.Socket.ActiveConnections-1 do
begin
If ServerSocket1.Socket.Connections[i].ReceiveText='!Date' then begin
ServerSocket1.Socket.Connections[i].SendText('La date est :'+FormatDateTime('ddddd', Now) );
end;
If ServerSocket1.Socket.Connections[i].ReceiveText='!Heure' then begin
ServerSocket1.Socket.Connections[i].SendText('L'heure est '+FormatDateTime('tt', Now) );
end;
end;
end;
end.

Quand j'envoie !Date... je recois la date !
Quand j'envoie !Heure... je recois...rien =,c !
Je voidrais recevoire la date mais aussit l'heure comment faire ??!!
Configuration: Windows XP / Firefox 3.5.8
A voir également:
  • Petit coup de main en delphi
  • Delphi 7 - Télécharger - Langages
  • Petit 1 comme ² - <a href="https://forums.commentcamarche.net/forum/bureautique-25">Forum Bureautique</a>
  • Trier du plus petit au plus grand excel - Guide
  • Coup d'un soir avis - <a href="https://forums.commentcamarche.net/forum/consommation-internet-301">Forum Consommation & Internet</a>
  • Coup du soir - <a href="https://forums.commentcamarche.net/forum/reseaux-sociaux-10">Forum Réseaux sociaux</a>

1 réponse

samiechikh Messages postés 10 Date d'inscription   Statut Membre Dernière intervention   1
 
passe par : datetostr et timetostr
0