programming we consider all important topic for knowledge about controls,web Services, JSON, Ajax, database, and interview related Question. In this and sql server tutorial blog we give many examples of jquery as like How Play YouTube Video in Your Website by URL, How to Play YouTube Videos in by using Jquery , Jquery Change div background on mouseover in , JQuery UI Datepicker (Calendar) etc.

Monday, September 9, 2013

Set the date format

How to Set the current data into Asp text box in :

In programming it is very simple that u set the current date in specific format .if u want to set the current date in time and date both the  use:

Set Date:


here TextBox1 is the Textbox id and dateTime.Now is function.
we want to set the current date with time in Text property of text.

how to to set the date format in to gridview in programming :

for this we use DateTime.Now.Date.ToString(); the current date set in textbox in String format.
If You want to want a specific  format the Give format in to ToString() function as like,


Format DateTime:

dd-MMM-yyy is a format of date :
  • dd- refer to date ,
  • MMM refer to Month, 
  • yyyy refer to Year.

Other Related Post : related post And Examples:

No comments:

Post a Comment