Could anybody help me in finding out the date difference in mm/dd/yyyy hh:mm format. I have a date field and has to calculate the difference using system date. Please suggest me if anybody has idea on how to achieve that.
I don't think there is a difference function for date, you will probably have to do this manually. Though I don't have the specifics for you, the general approach would be to:
convert each to just date format
extract the year, month and day for each date and store in different variable
subtract system year from year, system month from month, etc.
if the month or day of db is greater than system month or day, "carry" from the year or the month.
store the differences in variables as well
apply logic to figure out date.
or easier might be to convert the difference to days. and then convert it back into date.
p.s. don't forget to post a FAQ when you are finished [sig][/sig]
Yes, There is a DateDiff function. If you are using Crystal Reports 7 or greater
the function will be found as a download on the SeagateSoftware Web Site.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.