Jump to content

can't use timespan as a regression model response


Hanane AMGHAR

Recommended Posts

Go to 'insert' -> 'transformation' -> pick your data table and'change data type' from the drop down and click 'add'. Take your column and pick the desired data type.

If your timespan column is a calculated column you could already make this transformation or make a copy of your timespan column with required data type: String([column]), Real([column])...

Link to comment
Share on other sites

So why do you need the time span function Can't you just use the DateDiff function and specify your units

 

DateDiff('day',[CloseDate],[LossDate]) or DateDiff('hour',[CloseDate],[LossDate]) or ....

 

The TimeSpan function will give you this format: d.h:m:s.ms  (<-days.hours:minutes:seconds.ms). So 26.5 hours (= 1 day, 2 hours, 30 minutes) would be 1.2:30:00.0. The advantage is that you can easily read all units. 

 

If you need numeric values then you should not convert to TimeSpan

Link to comment
Share on other sites

No, that's not what you did... You only changed the formatting of the column. The date type is still TimeSpan.

 

Please specifiy your units in the DateDiff function and the data type will be a real.

 

See my answer from yesterday:

 

So why do you need the time span function Can't you just use the DateDiff function and specify your units

 

DateDiff('day',[CloseDate],[LossDate]) or DateDiff('hour',[CloseDate],[LossDate]) or ....

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...