Date and Time Articles

C# Time Class

Introduction The idea comes when i must create a projectthat work lots with time. So i have create time class. With this classyou can calculate (sum) times, convert times from and to other datatypes. Time class is writen in C# and .NET 2.0. Time class explantation. This is simple class and is not much to […]

Read more

Custom ShortDate type (struct: Icomparable)

Here it is a custom C#.NET Date type (struct)that will help you deal with converting to and from strings. The structimplements the IComparable interface and overrides the ToString, Equalsand GetHashCode() functions. In my work I use short dates all the time sothis struct has only 3 members: day, month and year. It is realy easyto […]

Read more

Getting the Date/Time Using The Daytime Protocol (RFC 867)

By Saumit S. Sheth This program gets the official date and time from the NIST (ITS) timeserverand updates the system time on your computer. Download NISTime.cs

Read more

World Timings using Windows Application in C#

I developed a C# application for finding World Timings given the US Central Timing. I have used several labels and textboxes, one group box andtwo buttons in this Windows application. I have used labelsto label all Time Zones, textboxes to display their correspondingtimings and group box to group all labels and text boxes .I used […]

Read more

C# Time Zone

This small application will give idea about Time Zone in c#, .Net platform having Class name called Time Zone in System Name space, Time Zone is abstractClass so we can't create instants of Time Zone , but Time Time Zone having Method called as CurrentTimeZone it returns number of properties. Download the Mytimez.cs file and […]

Read more

C# Timer Demo

This is an example of a timer in C#. It gives you an understand of time / clock and time conversion functionality. Some Tips using Timer: 1.Timer_Event will fire only after the Timer.Start() method is called. 2.Interval property is used to set the interval between Timer_Event. 3.Timer can be stopped either by disabling the Timer […]

Read more

Digital Clock in C#

  Here is a an example of how to make a digital clock using C#. I haveincluded the graphics, source code, and command line string (includedas a file – comp.bat) in the zip file.I hope you enjoy!! Download Digital Clock – archive29.zip   using System;using System.WinForms;using System.Drawing;using System.Drawing.Drawing2D;using System.Drawing.Imaging;public class h2:Form{ private Image []image=new Bitmap[10]; […]

Read more

Use of DATE Jargon in C#

  Use of Date Jargaon in C#.The following program will use some functions of DateTime class.This is a console based program which shows current months calendar and also provide optionfor viewing next month,year,previous month,years calendar too. using System; class MyDate{ private int Year; private int Month; private static int Day=1; MyDate() { DateTime today=DateTime.Now; this.Year=today.Year; […]

Read more

C# DateTime Structure

Here is an example of how the DateTime Structure works for C#. It's extremely basic and very easy to follow. /*This program finds out your Age using the DateTime structure in C#.*/ using System; class DOB{ private DateTime dtDob; private DateTime dtNow; private DateTime dtAge; private int intDay; private int intMonth; private int intYear; private […]

Read more