C# Corner
Tech
News
Videos
Forums
Trainings
Books
Live
More
Interviews
Events
Jobs
Learn
Career
Members
Blogs
Challenges
Certifications
Bounties
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
Tags
No tag found
Content Filter
Articles
Videos
Blogs
Resources
News
Forums
Interviews
Complexity Level
Beginner
Intermediate
Advanced
Refine by Author
[Clear]
Scott Lysle(6)
Mahesh Chand(5)
Rohatash Kumar(4)
Chethan N(4)
Mike Gold(3)
Sushila Patel(3)
Jay Pankhaniya(2)
Manas Mohapatra(2)
Vo Duc Thanh(2)
Hirendra Sisodiya(2)
Gaurav Gupta(2)
Vulpes (2)
Mahender Pal(2)
Shubham Srivastava(2)
Sandhiya Priya(1)
Sanwar Ranwa(1)
Baibhav Kumar(1)
Uday Dodiya(1)
Mark Pelf(1)
Punar Dutt Rajput(1)
Amit Mohanty(1)
Sameer Shukla(1)
David Mccarter(1)
Ram Prasad M(1)
Virender Verma(1)
Karthikeyan Sekar(1)
Suvendu Shekhar Giri(1)
Bharath Reddy(1)
Bryian Tan(1)
Sandeep Mittal(1)
Afzaal Ahmad Zeeshan(1)
Sourabh Somani(1)
Aman (1)
Santhosh Kumar Jayaraman(1)
Arjun Panwar(1)
Amit Choudhary(1)
Gohil Jayendrasinh(1)
Michael Livshitz(1)
Ashish Singhal(1)
Prasad (1)
Dinesh Gabhane(1)
Ziggy Rafiq(1)
Bohdan Stupak(1)
Kunj Sangani(1)
Ecco Suprastyo(1)
Muhammad Aqib Shehzad(1)
Rakesh (1)
Emiliano Musso(1)
Devesh Omar(1)
Biswa Pujarini Mohapatra(1)
Nikhil Patil(1)
Shivang (1)
Vignesh Kumar(1)
Lokendra Singh(1)
Jithu Thomas(1)
Keyur (1)
Jaimin Patel(1)
Tural Suleymani(1)
Deepak Tewatia(1)
Dhruvin Shah(1)
Mageshwaran R(1)
Naresh Beniwal(1)
Gyanender Sharma(1)
Susan Abraham(1)
Richa Garg(1)
Shuvro Pall(1)
Guest User(1)
Suthish Nair(1)
C# Curator(1)
Naser Gharachi(1)
Mostafa Belal(1)
Tin Lam(1)
Mokhtar B(1)
Resources
No resource found
How to Fix the Varchar to Datetime Conversion Error in ASP.NET
Jan 16, 2026.
Fix the "varchar to datetime out-of-range" error in ASP.NET when interacting with SQL Server. Learn quick fixes and the best practice of using parameterized queries for robust date handling and SQL injection prevention.
How to Implement DateTime Localization in Vue.js
Mar 29, 2024.
DateTime localization in Vue.js customizes date and time displays to users' language and region preferences. Utilizing Intl.DateTimeFormat API, developers format dates dynamically for personalized interfaces across diverse global audiences.
What is DateTime Manipulation in C#?
Mar 12, 2024.
Master DateTime manipulation in C# with this comprehensive guide. Explore methods like 'Add' and properties for modification, extract components, and learn about rounding and truncating DateTime values for robust applications.
DateTime in SQL Server
Sep 13, 2023.
In this article we will learn about DateTime in SQL Server
SQL Server & EF7: Using datetime vs datetime2 Data Type
Jun 12, 2023.
Showing problems with limited accuracy of SqlServer data type “datetime” in .NET7 EF7 environment
How to use DATETIME functions in MySQL
Apr 27, 2023.
Uses and working of DATETIME function in MySQL.
C# DateTime Conversion With Specific TimeZone
Jan 20, 2022.
Here, in this article we have shared some functions which works with the dynamic time. in short the application will work as per your device timezone.
Mastering the Art of Convert DateTime Formats In SQL Server with Over 30 Code Examples
Jan 04, 2022.
Learn how to convert datetime values to different formats in SQL Server with this comprehensive guide. Explore various date conversion functions and formats, including examples and code snippets, to efficiently manipulate and format date and time data in your SQL Server queries.
Handling DateTime In Pandas
Jan 01, 2022.
In this article explains how to work with DateTime in Pandas.
Coding Faster With The dotNetTips Utility - DateTime Extensions
Aug 22, 2020.
In this article, you will learn about Coding Faster with the dotNetTips Utility: DateTime Extensions.
Convert DateTime Field's UTC Value To The Correct Time Zone In An SPFx Webpart
Aug 04, 2020.
This Article explains how the DateTime field values are displayed in the correct time zone based on the User's and Site's regional settings. And provides the code snippet to easily convert the UTC DateTime values within an SPFx webapart
Calculate Time Difference Between Two DateTime In Power Automate
May 11, 2020.
In this article you will learn how to calculate time difference between two datetime in Power Automate.
Learn About DateTime Struct In C#
May 14, 2018.
In C#, to perform Date & Time related information and operations, we have DateTime struct. Let us see it in detail.
Difference Between MySQL DATETIME And TIMESTAMP DataTypes
Nov 29, 2017.
A simple question that may come to one's mind while working with MySQL is "Whether to assign DATETIME or TIMESTAMP datatype for a column as both seem to store the same data?”. Even though they store the same data, they differ in some ways and let's check those things out with the help of a small example.
How To Use Bootstrap DateTime Picker In ASP.NET MVC With Angular As Directive
Oct 03, 2017.
This tutorial covers the step-by-step process of setting up the DateTime Picker, configuring it for optimal user experience, and utilizing Angular directives for seamless interaction. Enhance your web forms with this powerful date and time selection tool!
Convert DateTime To String Format Using IQueryable
Jan 10, 2017.
In this article, you will learn how to convert DateTime to string (yyyy/mm/dd) format in ViewModel/Whatever class with IQueryable.
String To DateTime Conversion In C#
Dec 25, 2015.
C# convert string to datetime. Learn how to convert a string to datetime in C#. There are several common methods including Convert.ToDateTime, DateTime.Parse, and DateTime.ParseExact to convert a string into a DateTime in C#.
New DateTime Function In SQL Server 2012
Nov 15, 2015.
In this article you will learn new DateTime Function in SQL Server 2012.
Overview of DateTime in ASP.NET
Feb 12, 2015.
This article provides an overview of the DateTime class and its use in ASP.NET Websites and Web Applications.
Most Commonly Used DateTime Function in SQL Server
Jun 24, 2014.
This article describes about date and time functions of SQL Server which is most commonly used.
Implementing DateTime Class in Windows Phone Application Using C#
Mar 12, 2014.
This is a very small article in which we will implement the DateTime Class in Windows Phone Applications using C#.
Handling DateTime Data Type in C# : Part 2
May 15, 2013.
This article explores ways to support strong date and time data formats. With the .NET Framework you do not need to spend time building a class for storing and processing time. Instead we can use the immensely powerful built-in library that supports nearly all calculations that will save you so much time.
Handling DateTime Data Type in C# : Part 1
Apr 27, 2013.
Handling DateTime Data Type in C#: Part 1 is a guide that focuses on effectively managing and manipulating DateTime data within C# applications. This guide likely covers essential concepts related to parsing, formatting, arithmetic operations, and time zone handling with DateTime objects in C#. It provides developers with foundational knowledge to work seamlessly with date and time values, ensuring accurate representation and interaction with temporal data.
Getting Date and Time Parts From DateTime in SQL Server
Apr 15, 2013.
In this article, I would like to show the functions Datepart, DateName, Year, Month and Day in SQL Server.
Add and subtract functionalities in DateTime and VB.NET
Nov 10, 2012.
Telerik Rad DateTime Picker in Windows Store Apps Using C#
Oct 03, 2012.
In this article we are going to learn about Telerik Rad Controls in XAML.
New Built in Functions in SQL Server 2012 : DateTime Functions
Aug 18, 2012.
In this article, let us see how to use the 7 new builtin DateTime functions of Microsoft SQL Server 2012 Release Candidate 0 with their syntax and sample queries.
Working with DateTime in MySQL
Nov 10, 2011.
In this article we will learn about timestamp formatting in MySQL.
Extending the DateTime structure in C#: Part II
Apr 14, 2011.
Extending the DateTime structure: Part I
Apr 12, 2011.
This article presents some extension methods which I hope will be useful for those developers who, like myself, work a lot with dates.
Setting your website DateTime according to Time Zone Offset of the client
May 04, 2010.
We have seen situations where we have to use the GMT time and get the time zone of client to show every user his own Date Time. In this article we will see how to implement this.
GridView using LINQ and Convert datetime to shortdate in LINQ.
Dec 30, 2009.
In this article you will learn how to create a hyperlink in GridView using LINQ and Convert datetime to shortdate in LINQ.
Working with the ObjectDataSource and DateTime Type
Apr 07, 2008.
This tip will help you to work with the ObjectDataSource, when at least one of the properties of your business object (BO) is type of the DateTime .
How to Insert a Date Into DateTime Column Using ADO.NET & C#
Feb 04, 2005.
In this article, we will show how to insert a date into a date column using ADO.NET and C#.
An Assignable DateTime Class in C#
Jan 11, 2005.
Occasionally you run into a structure in the .NET library that you really wish was a class so you can inherit all its existing properties, override the ones you don’t like, and add new properties and methods.
Enter Null Values for DateTime Column of SQL Server
Sep 26, 2003.
Inserting a null value to the DateTime Field in SQL Server is one of the most common issues giving various errors. Even if one enters null values the value in the database is some default value as 1/1/1900 12:00:00 AM.
Format DateTime Values in XML Extracted From DataSet
Jul 17, 2003.
In this article we'll see how to specify the format of DateTime values extracted from the ADO.NET DataSet and to verify we will write formatted contents in xml file.
Calendar Using DateTime Class
Sep 05, 2001.
The console based calendar program is a which when run shows current month's calendar using the C# Date Time Class.
DateTime Methods in .Net and C#
May 29, 2024.
DateTime Methods in .Net and C#
NodaTime Vs System.Datetime Types in .Net
Dec 13, 2023.
This Article gives the comparison between NodaTime and System.datetime types in .NET. Discover the differences between NodaTime and System.DateTime in .NET, from handling time zones to serialization. Learn when to choose NodaTime for complex scenarios and how to implement it.
NodaTime Vs System.datetime in .NET
Dec 10, 2023.
Noda Time and System.DateTime in .NET offers distinct approaches to date and time handling. Compare their features, immutability, time zone support, precision, and safety for your application's requirements.
Best Practices for Working with DateTime, UTC, and Offset in C#
Aug 28, 2023.
Discover best practices for handling DateTime, UTC, and Offset in C# with expert insights from Ziggy Rafiq, ensuring efficient time management in your applications Learn best practices, tips, and code examples for seamless time zone conversions and daylight-saving time considerations
DateTime.TryParse And The Case Of Z Letter
May 15, 2021.
This short article aims to fill the gap in docs explaining what is ISO-8601 date format, how it is treated by DateTime.TryParse compared to other formats
How To Use PnP DateTimePicker In SharePoint Framework Webpart (SPFx)
Jul 21, 2020.
This article will help us with step by step guide for using PnP DateTimePicker Control
Datetime C# from a Timestamp
Mar 17, 2020.
In this article, you will learn about Datetime in C# from a timestamp.
Datetime Zone Issue In Liquid - Dynamics 365 Portal
Nov 30, 2018.
This article is about the date time format and zone issue in Dynamics 365 Portal. Dynamics 365 CE store date time in UTC format in CRM DB and when you will display date field on Dynamics 365 Portals it will display same date which sometime leads to incorrect date & time. If you are facing same issue this article can help you to fix it.
DateTime In C#
Jul 18, 2016.
Here is a detailed tutorial on C# DateTime class and how to work with dates and times using C#.
Resolve 'String Was Not Recognized As A Valid DateTime' Error
Dec 08, 2015.
In this article there is an elaboration of the occurrence of 'string was not recognized as a valid DateTime' error and its fix.
DateTime Method Using ASP.Net C#
Jun 29, 2015.
In this article we will see Date and Time using ASP.Net C#.
Examples Of DATE/DATETIME Conversion
May 15, 2015.
Basic considerations and examples of DATETIME, DATE and TIME data types.
Datetime Control Using jQuery
Jun 19, 2014.
In this article we will learn how to create a datetimepicker using the jQuery API.
DateTime Functions in SQL Server 2012
Mar 17, 2014.
This article describes all the new DateTime functions introduced in SQL Server 2012 with examples.
WPF DateTimeUpDown Control
Nov 10, 2011.
A DateTimeUpDown control allows us to increment or decrement the value of a DateTime using up/down keys, button spinner or the mouse wheel. The increment or decrement value depends on the current value and format of the control.
WPF DateTimePicker
Sep 17, 2011.
This article demonstrates how to use a DateTimePicker control in WPF with the help of XAML and C#.
DateTime In C#
Jun 21, 2011.
In C#, DateTime is a fundamental data type that represents dates and times. It is part of the System namespace and provides a rich set of methods and properties for working with dates and times. Here are some key points and features of DateTime in C#.
Working With C# DateTime
Jan 26, 2011.
The C# DateTime structure represents dates and time in C# and .NET. This tutorial explains C# DateTime class, its members, properties and how to use them to perform DateTime tasks such as format dates in C# and compare two dates in C#.
Cannot perform '>' operation on System.DateTime and System.Double
Feb 22, 2007.
I get error Cannot perform '>' operation on System.DateTime and System.Double when applying a filter on DataView.
Create SharePoint Lists and Columns in SPFx Using PnPjs
Aug 04, 2025.
Learn how to use PnPjs (spfi) in SPFx to dynamically create various SharePoint list columns like text, number, date, choice, and lookup fields using addFieldAsXml for seamless customization and automation.
Build a Daily Mood Tracker in C# Console App with JSON Storage
Aug 01, 2025.
In this beginner-friendly C# project, you will build a simple daily mood tracker using a console interface and JSON for local data storage. This project is great for understanding how to combine real-life utility with coding fundamentals.
Getting Particular Timezones Current Date Time in SQL Server
Jun 12, 2024.
To retrieve the current date and time for specific time zones in SQL Server, use the query SELECT * FROM sys.time_zone_info. This query returns information about supported time zones, including their current UTC offset and whether they are currently observing daylight saving time (DST).
Working with Dates and Times in Python Using Pendulum
May 30, 2024.
Pendulum is a powerful Python library for handling dates and times. It simplifies working with timezones, supports date manipulation, formatting, parsing, and provides convenient methods for datetime arithmetic.
The Built-in Date Object in JavaScript
Apr 29, 2024.
JavaScript's Date object simplifies date and time handling in applications. Learn how to create, manipulate, format dates, handle timezones, and perform operations for dynamic web experiences.
Creating Unit Test project for NodaTime
Jan 09, 2024.
Creating a NodaTime classlibrary project and adding Unit tests for that classlibrary. The creation of a NodaTime ClassLibrary project for .NET applications, emphasizing the importance of unit testing with xUnit. It provides step-by-step instructions, code snippets, and explanations for implementing and testing NodaTime functionalities, promoting robust and maintainable software development.
Getting Started With NodaTime
Dec 08, 2023.
Noda Time is an alternative date and time API for .NET. It helps you to think about your data more clearly, and express operations on that data more precisely.
Dealing with Date and Time in Humanizer in C#
Dec 01, 2023.
Learn how to handle date and time in a user-friendly way in C# projects using Humanizer. Covering DateTime and TimeSpan humanization with customization options and real-world use cases for improved user experience.
Date and Time Formatting in C#
Nov 27, 2023.
This guide provides a concise overview of working with DateTime in C#. It covers the basics of the DateTime structure, including obtaining the current date and time, representing specific dates, and manipulating dates.
T-SQL Interview Questions On Data Types
Jul 30, 2022.
In this article, I collected interview questions on data types. I participated in many interview calls and I was asked about (sometimes I asked the interviewee) many times the below interview questions .
Format Date in SQL Server using Format Function
Jun 12, 2022.
We will learn how to Format Date and Time in SQL Server Using FORMAT Function.
Power Apps Validation - End Date And Time Should Be Greater Than Start Date And Time
Sep 09, 2021.
During this article, we will talk about how we can apply DateTime validation in our Power Apps Form. Most of the time, we need to implement, one most common validation in Power Apps where End Datetime must be greater than Start DateTime. How can we apply that validation? Let’s see!
Find The Difference Of Day, Hour, Minutes, Seconds, In C#
Aug 08, 2021.
This Article contains the information and the simple and easy way to find the difference between the two date in a very easy way.
SQL Server System Functions: Aggregate, String, Math, Date
Nov 20, 2019.
Learn about SQL Server system functions including aggregate, string, mathematical, and date time functions. Explore their syntax and examples for efficient database operations. Ideal for beginners and students.
SQL DATE TIME Statement
Nov 20, 2019.
In this article you will learn how to use a SQL DATE TIME statement
Fetching Data Based On Date Field Using WebAPI
Apr 09, 2019.
This article is about using WebAPI request for datatime field in Dynamics 365 CE
Working With HTML5 Form Input Tags
Sep 02, 2013.
In this article, you learn about HTML5 Form Input Tags.
Working with Date and Time in SQL Server
Apr 11, 2013.
In this article, I would like to show the similarity of SQL Getdate function and the C# DateTime class.
DATEADD Function in SQL Server
Dec 11, 2012.
In this article, I would like to show the Dateadd Function in SQL Server.
Finding the first and last day of the month in VB.NET
Nov 10, 2012.
This article describe an approach to find out the first and last day of the month based upon either a selected date or selected month.
Custom Calendar Control in VB.NET
Nov 10, 2012.
The Custom Calendar Control described in this paper overcomes the above limitations of the DateTimePicker by enhancing the capabilities of the existing MonthCalendar Control provided by Visual Studio .Net.
Easy Date Validation in Visual Basic
Nov 10, 2012.
This article describes a simple approach to validating dates received as strings.
Assessing Dates of Birth using Visual Basic
Nov 09, 2012.
This article describes an approach to assessing the difference between a specified beginning and end date.
Telerik RadHubTile in Windows Store Apps Using XAML
Oct 26, 2012.
In this article we are going to learn about Telerik Rad Controls in XAML.
Date Format Specifier In C#
Oct 23, 2012.
In this article I will explain how to use the Date Format Specifier in C#.
Getting Difference of Two Dates in Windows Store App
Jul 02, 2012.
Today we will create an application in a windows store to determine the difference between two dates in hours.
Age Finder Windows Store App
Jun 22, 2012.
To day article we will create a application in Windows store in C# to find out the age of user to put the date of Birth as a input.
Digital Clock in C#
Jun 10, 2012.
In this article, I am going to explain creation of a digital clock in C#.
How to add Ribbon in a Word
Mar 28, 2011.
In this article we will learn how to customize the ribbon in a Word application.
Finding the First and Last Day Of A Month in C#
Mar 10, 2011.
A code snippet that shows a quick way to calculate the first and last days of any month.
Date and Time Functions in SQL Server
Mar 09, 2011.
This article will list Date and Time functions shipped with SQL Server.
Conversion Classes & CultureInfo Class in C#
Feb 03, 2010.
In this article I will explain you about the Conversion Classes & CultureInfo Class in C#.
Easy Date Validation in C#
Feb 23, 2009.
This article describes a simple approach to validating dates received as strings (e.g., 2/21/2008).
Assessing Dates of Birth Using C#
Aug 20, 2008.
This article describes an approach to assessing the difference between a specified beginning and end date. The example was written in the context of comparing a birth date to a specific end date but the same approach could be used to calculate the number of years, months, and days between a specified start and end date.
Find the First and Last Days of the Month with C#
Oct 31, 2007.
This article shall describe a very simple approach to finding out the first and last day of the month based upon either a selected date or selected month.
How to: Convert Miladi to Shamsi in C#
Aug 14, 2007.
This article show how we can convert Miladi to Shamsi in C#.
System Date Time Check Format
Oct 18, 2006.
This program executes the system date time format. Is it in dd/mmm/yyyy or other format and the which cultuerInfo is the system running on.
Get difference between two dates in C#
Aug 05, 2005.
This code snippet shows how to get difference between two dates in C#.
A Scheduled Application Launcher Service in C# and .NET
Oct 06, 2004.
This an article is on launching scheduled tasks. Not quite as exciting as launching a spaceship into outer space, but…hey, even astronauts have to automate some of their day to day activities.
Formatting ASP.NET DataGrid's Data
Jun 17, 2003.
This article shows you how to change the color of a DataGrid row and format of date.
Printing Invoices using C# and .NET
Mar 18, 2002.
This program can stand improvements but it will get you started in creating an invoice and printing it to the printer.
Multi-threaded Web Applications - Case I: Search Engine
Mar 07, 2002.
This article is the first of the series of 4. I will demonstrate the use of threading in web applications by implementing a simply search engine. The following 3 articles in the series will be a Port Scanner, a Reverse DNS and a Web Hammer respectively.
Time Ticker
Jun 26, 2001.
Graphics Class encapsulates a GDI+ drawing surface. The FromHWND method is used to create a new instance of the Graphics class from a window handle. Clear method fills the entire drawing surface with the specified RGB color by using Color class. DrawString method draws a string using Font and SolidBrush classes.