cancel
Showing results for 
Search instead for 
Did you mean: 

Expression Box Calculation Error

Former Member
0 Kudos

I have displayed the output of a query in a table. One of the columns in

the table shows 'Creation Date'. So I add an 'expression box' to the

table and enter the following expression in the Formatting Custom tab...

NSTR(DSUB(@Creation_Date,NOW(),'D'),'M')

The objective is to display the number of days lapsed since the record

was created on each row of the table. The system keeps returning -14018

or some other garbage on each row.

Please help.

View Entire Topic
Former Member
0 Kudos

Hi,

the expression commands like DVAL(), DSUB(), etc. require the dates in a specific format, which does not have to be similar to the format represented in portal or given by queries and so on.

You should experiment with double translation, i.e.

DVAL(DSTR(@DATUM1,'MM.DD.YYYY'))

Convert date to string and back to date.

This was the only way I could get date-issues get to work.

Kind Regards,

Benni

Former Member
0 Kudos

The problem is still there. The output in the expression box is always a constant value, although the Creation Date is constantly changing in each row. Latest attempt was using the following expression

DSUB(DVAL(DSTR(@Creation_Date,'MM.DD.YYYY')),DVAL(DSTR(NOW(),'MM.DD.YYYY')),"Y") returns -38.4

Thanks both of you for the help.

Regards,

Adeel Hashmi