# Formula Variable

Hi Guys,

I need to create formula variable on the Infoobject for date. I need to calculate no of days elapsed (i.e. Difference between Sales order date and invoice date).

In order to achive it during query run time I need to create formula variable for both dates. Not sure how do we ccreate one.

Can anyone help please?

Thanks

Kirk

I promise to return points for all useful answers as I always do.

##### Riccardo Venturini replied

Hi Kirk,

For the last roblem you can use the same tool of the revious adding a a last formula: you can use formula Data Functions DELTA or COUNT that return 1 or 0 if the object is equal or not to '0'. You have to apply this formula to the Formula Variable based on Invoice Date. The rusult has to be multilied to the difference of System Date and SO Creation Date.

Ciao.

Riccardo.