Agenda :
Dear all In this article we will discuss Must Avoid Mistakes using Date Time in C#.
Description :
In previous articles,I have explained MS Sql Server Row_Number() Interview Question 2023,How to work with File upload control using Asp.Net – PART - I, Working with File Upload control using Asp.Net – PART - II,How to resolve maximum requested length exceeded error with file upload control – PART - III different articles related to C#.Net,Asp.Net, SQL Server, XML, and DotNetInterviewQuestions Related articles. Now Let's work on MS SQL Server Row_Number() Interview Question 2023
Steps to work with this:
- Go To Visual Studio Click on New Website
- ClickOnAsp.Net Empty Website(Or choose any web template)Click Ok
- Drag and drop the respective button control
- Implement the code in as per the demonstration
Video Explanation:
Code:
//Response.Write(DateTime.Now.ToString("yyy/MM/dd hh:mm:ss")); (Avoid This type of implementation)
Response.Write(DateTime.Now.ToString("yyy/MM/dd HH:mm:ss")+"<br/>");
Response.Write(DateTime.Now.ToString("yyy/MM/ddd HH:mm:ss") + "<br/>");
Response.Write(DateTime.Now.ToString("yyy/MM/dddd HH:mm:ss") + "<br/>");
Response.Write(DateTime.Now.ToString("yyy/MM/dddd HH:mm:ss") + "<br/>");
Response.Write(DateTime.Now.ToString("yyy/MMM/dddd HH:mm:ss") + "<br/>");
Response.Write(DateTime.Now.ToString("yyy/MMMM/dddd HH:mm:ss") + "<br/>");
Response.Write(DateTime.Now.ToString("yyy/MMM/dddd HH:mm:ss z") + "<br/>");
Response.Write(DateTime.Now.ToString("yyy/MMMM/dddd HH:mm:ss zz") + "<br/>");
Response.Write(DateTime.Now.ToString("yyy/MMMM/dddd HH:mm:ss zzz") + "<br/>");
Response.Write(DateTime.Now.ToString("yyy/MMMM/dddd HH:mm:ss t") + "<br/>");
Response.Write(DateTime.Now.ToString("yyy/MMMM/dddd HH:mm:ss tt") + "<br/>");
Response.Write(DateTime.Now.ToString("yyy/MMMM/dddd HH:mm:ss ff") + "<br/>");
Response.Write(DateTime.Now.ToString("yyy/MMMM/dddd HH:mm:ss fff") + "<br/>");
Response.Write(DateTime.Now.ToString("yyy/MMMM/dddd HH:mm:ss ffff") + "<br/>");
Response.Write(DateTime.Now.ToString("yyy/MM/dddd HH:mm:ss ffffff") + "<br/>");
No comments :
Post a Comment