a smaller date minus a larger date is probably not...
# suiteanalytics
b
a smaller date minus a larger date is probably not what you want
m
reversed the dates but still something not quite right: 24/04/2019 11:13 24/04/2019 141454 = 0
b
24/04/2019 11:13 is a smaller date than 24/04/2019 141454
although to be honest, i don't think that really matters. you should be getting something other than 0
what formula are you using?
m
Formula (numeric)
b
I meant the actual formula for the column
m
Ah ok
(to_date({custrecord_job_start}, 'DD-MM-YYYY hh24:mi') - to_date({created}, 'DD-MM-YYYY hh24:mi')) * 24
b
I wouldn't trust the implicit conversion going on there
Give it a try without the to_date
I don't think it will give exactly what you want, but it should be better than 0
If that works out better, you can try doing the char conversion yourself using to_char
m
removing the conversion produces an unexpected error: ({custrecord_job_start} - {created}) * 24
b
what type of field is custrecord_job_start? If its a date/time field, subtracting created from it should give you an interval
m
both fields are date/time - so was hoping it should give me a correct time difference
b
Are you sure you are not doing something strange? Subtracting a date from a timestamp gives an interval. And explictly converting the timestamp to a char and then to a date makes the subtraction return a difference in days
message has been deleted
m
thanks - got the hours from the date