2 تا label بزار روی فرم بعد به این شکل کدشو بنویس :
public partial class Form1 : Form
{
Timer timer = new Timer();
public Form1()
{
InitializeComponent();
label2.Text = DateTime.Now.ToString("dd/MM/yyyy");//tarikh feli ro mide
label1.Text = DateTime.Now.ToString("HH:mm:ss tt");
timer.Tick += new EventHandler(timer_Tick);
timer.Interval = 800;
timer.Start();
}
private void timer_Tick(object sender, EventArgs e)
{
label1.Text = DateTime.Now.ToString("HH:mm:ss tt");//zaman ro mide
}
}