You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

using date/time values in linest

I want to use linest with a time series. Specifying the y-values as date returns an error. Linest complains that it expected a number and got "8/1/20".

According to linest help page, it will work with y-values either a number or a date/time value.

I have checked and the y data is formatted as a date/time. I can successfully perform other calculations on these values using date functions such as duration.

What is needed to use date/time values in the y-values of linest?


Posted on Oct 24, 2020 1:14 PM

Reply
Question marked as Top-ranking reply

Posted on Oct 24, 2020 2:04 PM

It does say that, and it does not seem to work. Being that dates are not answers to this kind of math equation, I was trying to figure out what the function result would be if it worked so I charted some dates (Y) vs numbers (X) and turned on a linear trendline. It looked like it created the parameters for an equation that would result in the number of seconds from Jan 1, 2001.


Given that the results would be kind of strange anyway, you might change your Y values into numbers, like number of days from a start date (use a column to subtract your dates from the start date), and use LINEST on that instead.

Similar questions

2 replies
Question marked as Top-ranking reply

Oct 24, 2020 2:04 PM in response to Robert Broome

It does say that, and it does not seem to work. Being that dates are not answers to this kind of math equation, I was trying to figure out what the function result would be if it worked so I charted some dates (Y) vs numbers (X) and turned on a linear trendline. It looked like it created the parameters for an equation that would result in the number of seconds from Jan 1, 2001.


Given that the results would be kind of strange anyway, you might change your Y values into numbers, like number of days from a start date (use a column to subtract your dates from the start date), and use LINEST on that instead.

using date/time values in linest

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.