Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date/Time Functions 1

Status
Not open for further replies.

itflash

Programmer
Jul 18, 2001
535
0
0
GB

Hi all

I have a....
form with a data environment (de).
grid bound to a table in the de.

My grid displays a date/time field from a table.
However, I only want to display the time element.

Is there any way to do this for a column in my grid?


Thanks
[cat2]

 
Maybe I'm missing something but ...

IF your field contains DATETIME() then TIME(fieldname) should return the time.

Works for me in the Command Window. Did not try in a form.

Jack
 
thanks for the reply

my grid is bound to a table
the control source is set to the field, but i cannot put a command in the control source

 
Try putting this as the ControlSource for the column:
[tt]
ttoc(myTimeField,2)
[/tt]
Substitute your Datetime field instead of "myTimeField".

Ian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top