Get the Flash Player to see the slideshow.

The difference between dates

Posted by lm on January 11, 2009 under Corvu, Corvu 5.2 |

With CorVu, you can easily use dates in formulas and mathematical calculations.

The easiest one is to create a numerical column and subtract one date from another, @date1 - @date 2.  This will give the difference in days between the two dates.

The second way is to add/subtract a number to/from a date.  This can be hard coded in a formula or taken from another column.  Create a date column and use the formula @date - 365 is for a year ago, for example.

The third way I would use involve the use of the datediff function.  Create a numerical column and reference 2 dates, in brackets, separated by a column.  for example datediff(@date1,@date2).  Now after the second date, put another column and the ‘s’ for seconds, ‘m’ for minutes, ‘h’ for hours and ‘d’ for days.  (The function description does give these.)   The formula should look like datediff(@date1,@date2,’s’).  In practice I use the datediff for calculating length of call times for example, where the database only has start and end times.

Oh, and for all you regular CorVu formula writers, when you upgrade to 5.2, just count how many times you scroll to the bottom when creating a formula.  The ‘Type In Formula’ has been moved to the top of the list, where I agree it should be, but old habits die hard.  Seven years of scrolling to the bottom has made it somewhat automatic!

L

Add A Comment