Lost universe of Programing

USERNAME :- Forum Post:-114
 
HomePortalGalleryRegisterLog in

Share
 

 Extract Date From Date time data type in c#

Go down 
AuthorMessage
Administrator
Admin
Admin
Administrator

Male
Number of posts : 160
Age : 33
Location : Lucknow
Job/hobbies : Software Engeener
What U like To do ? : Because Its Rock with me.
Registration date : 2008-01-06

Extract Date From Date time data type in c# Empty
PostSubject: Extract Date From Date time data type in c#   Extract Date From Date time data type in c# I_icon_minitime4/29/2009, 10:02 am

lb_display is the lable name where the result will be shown.
Suppose “11/2/2003 12:00:00″ this is the value which is stored in the
data base when you declare the row as date time in database now if you
want the date from datetime data type then
FOR C# CODE
Code:

Lb_Display.Text = DateTime.Parse(Ds.Tables[0].Rows[0][7].ToString ()).ToShortDateString ();
or
Lb_Display.Text = DateTime.Parse(’11/2/2003 12:00:00 Am’).ToShortTimeString ();
Result will be “11/2/2003″ or "12:00:00 Am"

_________________

""»-(¯`v´¯)-»"HACKER OF HEART"»-(¯`v´¯)-»"
Extract Date From Date time data type in c# Earth10
Back to top Go down
https://aspx.forumotion.com
 
Extract Date From Date time data type in c#
Back to top 
Page 1 of 1
 Similar topics
-
» Haunted- Release Date
» Here is some really useful information about travelling with your Ipad and using MM.
» Lucky / Unlucky days
» Bulgarian Boy Introduce Himself !
» NECA Toy Fair 2011 reveal thread

Permissions in this forum:You cannot reply to topics in this forum
Lost universe of Programing :: --=| SOURCE CODE |=-- :: CODE FOR C# & ASP.NET-
Jump to: