As an investor, it's generally in your best interest to ignore a lot of the short-term happenings in the stock market and focus on the long run. Ideally, you invest in companies that you believe in and trust the long-term results will be there. If you're investing in great companies, this is the case more times than not.

Tech stocks had a rough 2022, but many have seen much brighter days in 2023 and are poised to continue producing results. If you're an investor with time on your side, these two tech stocks are good investments that can add value to your portfolio.

1. CrowdStrike Holdings

It's been a good year for cybersecurity company CrowdStrike Holdings (CRWD 2.03%), with its stock up around 28% year to date. Unfortunately, the company is still down double-digit percentages in the past 12 months, but that shouldn't deter long-term investors. CrowdStrike is positioned to be a top cybersecurity company for the long haul. 

CrowdStrike has done a great job at leveraging artificial intelligence (A.I.) to create innovative cybersecurity solutions. The company was ahead of the curve when it started over a decade ago, and it's paying off. 

Its annual recurring revenue (ARR), which is revenue from subscriptions over a 12-month period, was $2.56 billion at the end of its fiscal 2023 (ended. January 31) -- up 48% year over year. Of that, $221.7 million was net new ARR CrowdStrike added in its fourth quarter.

For a company that relies heavily on subscriptions like CrowdStrike, ARR gives a more complete picture of its ability to have sustainable revenue. Over the past five years, Crowdstrike's ARR experienced a compound annual growth rate of 79%. It wants to achieve $5 billion by the end of its fiscal 2026, which is more than doable at current growth rates.

Where CrowdStrike stands out is its ability to keep up with (and sometimes pioneer) industry innovations. As the cybersecurity industry as a whole continues growing, Crowdstrike's willingness to evolve with it and stay ahead of the curve should be a competitive advantage.

2. Microsoft

Microsoft (MSFT 1.82%) is the world's second-largest publicly traded company with a market cap of over $2.3 trillion -- and it's up more than 29% year to date. Still, the company has enough growth opportunities for long-term investors.

One of Microsoft's more important investments could end up being the $10 billion it recently invested in ChatGPT's creator, OpenAI (it also invested $1 billion in July 2019). This is the third phase of the company's long-term partnership with OpenAI, merging resources that can give both companies a leg up in the A.I. race. OpenAI gets the cash infusion and access to Microsoft resources, and Microsoft gets to integrate the technology into its suite of products and services.

A.I. aside, Microsoft's ecosystem of products and services has put the company in as recession-resistant a position as any big tech company. Its products and services are essential for the operation of countless businesses and governments across the globe.

If economic conditions cause spending to slow, it's more likely to affect companies selling consumer products and services than Microsoft, which has a heavy corporate client base. It's much easier for consumers not to buy the latest phone model when money's tight than it is for a business to cancel a cloud subscription service that houses its data.

Microsoft is a staple in the tech sector that's all but certain to produce good long-term results. It has high growth potential while being equipped with all the resources needed to survive any economic conditions. That's a two-for-one benefit for investors.

Its roughly 0.89% dividend yield isn't quite noteworthy, but it's something. Knowing you'll have quarterly payments headed your way regardless of how the stock performs can help investors stomach any volatility the stock may run into in the short-term.