This paper presents a study investigating the potential market of ridesourcing services, with a focus on the attitudinal and preferential differences between Millennials and Generation Xers. Data obtained from a stated preference survey were utilized, where the respondents were asked to choose between a conventional mode (private vehicle driver, transit, or private vehicle passenger) and ridesourcing modes (exclusive ride and shared ride). Error component nested logit models were developed for Generation Xers and Millennials, respectively. Latent attitudes derived through factor analysis were incorporated into models. A wide range of attitudinal indicators, including general mobility attitudes, perceived benefits and concerns of shared mobility services, reasons for or against owning a car, reasons for ridings Autonomous Vehicles (AV), and the most desired AV features were considered to extract latent attitudes. Model results indicated distinct mode choice behavior between Millennials and Generation Xers. For Generation Xers, the choice to switch to ridesourcing was highly dependent on the perceived time and cost benefits of shared mobility. On the other hand, Millennials’ choices were more likely to be influenced by their attitudes or desire toward technology, on-demand services, and driving stress relief. Interestingly, the joy of driving showed a negative impact on Millennials' use of shared-ride services only. The findings from this study provide a more in-depth understanding of the distinct behavior of Generation Xers and Millennials toward shared mobility services, which could help develop strategies and policies to focus more effectively on the needs and concerns of individuals based on their characteristics and attitudes and help promote sustainable transportation system.