duration in days, not as date?

K

Karel

I want to make a field that displays the duration between
2 dates. I used the folowing rule for this : CVDate([Date
of Closure]-[Date of Open]), where "Date of Closure"
and "Date of Open" are 2 other fields in the same query.
But, when the duration is longer then 1 day, it displays
it as follows: 02/01/1900 00:00:04. How can I make it so
that it just displays the number of days and the time?
(like: 2days 00:00:04 or something likely).
Thx in advance

Karel
 
M

Matt

-----Original Message-----
I want to make a field that displays the duration between
2 dates. I used the folowing rule for this : CVDate ([Date
of Closure]-[Date of Open]), where "Date of Closure"
and "Date of Open" are 2 other fields in the same query.
But, when the duration is longer then 1 day, it displays
it as follows: 02/01/1900 00:00:04. How can I make it so
that it just displays the number of days and the time?
(like: 2days 00:00:04 or something likely).
Thx in advance

Karel
.

Hi Karel,

Not sure if this will give you the desire result but you
could you the following formula or similar.

Format ( your code ,"d")

or use Date Diff function - Help will give examples. i'm
sure you can use Format in conjunction with date diff
also.

regards,
matt
 
W

Wayne Morgan

Try the DateDiff VBA function.

DateDiff("d", [Date of Open], [Date of Closure])
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top