Lost universe of Programing

USERNAME :- Forum Post:-114
 
HomePortalGalleryRegisterLog in

Share | 
 

 Extract Time From Date time data type in c#

Go down 
AuthorMessage
Administrator
Admin
Admin
avatar

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

PostSubject: Extract Time From Date time data type in c#   2/29/2008, 8:17 pm

To Extract Time From the datetime, you have to write a following code in C#

Code:
[size=9]
Lb_Display.Text = [/size][size=9][color=#008080]DateTime[/color][/size][size=9].Parse(Ds.Tables[0].Rows[0][7].ToString ()).ToShortTimeString ();
or
Lb_Display.Text = [size=9][color=#008080]DateTime[/color][/size][size=9].Parse('11/2/2003 12:00:00 Am').ToShortTimeString ();[/size][/size]

Here Lb_Displayis the lable where the data is to be stored,So if "11/2/2003 12:00:00" then the result will be "12:00:00"

"Ds.Tables[0].Rows[0][7].ToString ()" this is the code for datatime value to be extract from database bye using Stored Procedure..

_________________

""-(`v)-"HACKER OF HEART"-(`v)-"

Back to top Go down
View user profile http://aspx.forumotion.com
 
Extract Time From Date time data type in c#
Back to top 
Page 1 of 1
 Similar topics
-
» Bracken Tor to Explore The Time Of Tooth and Claw
» Houdini 1.5 at long Time Control: 100 games.
» Fantage: NIGHT TIME AGAIN!!
» Long time no Fantage Recolor, huh?
» Stockfish 01-02-2015 64-bit 4CPU Gauntlet [Long Time Control]

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: