views:

32

answers:

1

hi

i have this value in date field: 07/09/2010 07:34

how i can see this only: 07:34

how to do it in access 2007 and in C# format ?

thank's in advance

+1  A: 

Try this:

Date dt = <value>;
String time = dt.ToString("hh:mm");

Use HH:mm for 24 hour format and hh:mm tt for 12 hour format with AM/PM.

Use this for reference:
http://authors.aspalliance.com/aspxtreme/sys/demos/datetimeformats.aspx

Sidharth Panwar
thank's for the C# help, and how i can show this in access ?
Gold
As in `SELECT Format([DateAndTime],"Short Time") AS TimeOnlyFROM SomeTable` ?
Remou
thank's !!! it work's !!!
Gold