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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

seperating time from date 1

Status
Not open for further replies.

Saint1234

Programmer
Feb 18, 2004
25
IE
Hi All,
I am sure this is very simple but my head has gone blank. I have DateTime fields, what I need to do is count and highlight the fields where the time is greater than 17:00 the format of the datetime fields is DD/MM/yyyy HH:mm:SS

Thanks in advance
G
 
Write a formula:

if time{YourDateTimeField})> time(17,0,0) then 1 else 0

Perform a simple Sum of this formula for the count.

Software Sales, Training, Implementation and Support for Exact Macola, eSynergy, and Crystal Reports
 
Thanks dgillz

That worked a treat, sorry to be a pain but another question how do I highlight it? So if that date is greater than 17:00:00 how can i change the font colour and make it bold?

Thanks
G
 
Right click the field and select format field. On the font tab, click the X-2 button to the right of the style drop down box, and enter a formula:

If time({Datetime}) > time(17,0,0) then Crbold

Do a similar formula from the X-2 button to the right of the color drop down box:

If time({Datetime}) > time(17,0,0) then Red


Software Sales, Training, Implementation and Support for Exact Macola, eSynergy, and Crystal Reports
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top