Tag Archives: dates

Look for dates in the digits of Pi in C#

The example Find patterns within pi in C# looks for patterns within the digits of Pi. You can use that example to look for dates such as 4/1. This example determines whether the first 100 thousand digits of Pi contains … Continue reading

Posted in algorithms, mathematics, strings | Tagged , , , , , , , , , , , , | Leave a comment

Find the Friday following a given date in C#

This example shows how you can find the Friday following a particular date. You can use a similar method to find other days of the week following a specific date. (Note that I have updated this example from its original … Continue reading

Posted in variables | Tagged , , , , , , , , , , , | 2 Comments

Find the days, hours, minutes, or seconds between two dates in C#

This example uses a TimeSpan to find the days, hours, minutes, or seconds between two dates. When the user changes the date text, the program executes the following code. // If the text is a date, display // the elapsed … Continue reading

Posted in parsing, variables | Tagged , , , , , , , , , , , , , | Leave a comment