A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data
Dear @DSPAL,
I truly appreciate you sharing this update and the useful clarification.
Your observation about regional date formats explains the issue well, and using the DATE() function is the correct and recommended approach. This ensures the STOCKHISTORY formula works consistently regardless of country or regional settings, and it will definitely help other users who may run into the same problem.
Therefore, I would make a brief summary of this post so that other forum members could easily find useful information here:
Issue description
Customer reported that the STOCKHISTORY function was not working correctly in Microsoft 365 (Insider) when specifying the start_date parameter, with different behavior observed between the US and Canada.
Current Solution (Provided by @DSPAL)
The start_date was provided as a text string (for example "1/1/2025"), which is interpreted based on regional/local date settings. This caused the formula to fail or behave inconsistently across locales.
- In the USA, Start_date is : "1/1/2025"
- In Canada, start date must be: "2025/1/1"
A better way to write the formula so it works correctly anywhere is: =STOCKHISTORY("IBM",DATE(2025,1,1),TODAY(),1,2)
Thank you for sharing such thoughtful feedback.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment". Once marked, it will automatically be pinned to top. As other users will also search for information in this community, your valuable vote up will definitely also help other users who have similar queries easily to find the correct channel and useful information more quickly.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.