I'm reminded of the title Wild Arms. The intro was playable and about 30 minutes. It served as a character introduction, familiarizing players with the controls and special abilities for each while systematically giving purpose their meeting and personal agenda. It was well done in its time and it wasn't until I became more familiar with games and what goes into them, that I caught the developers actually attached the demo to the front-end and we're able to drop players to the core immediately after. It cut some of the development and story arc intrusion problems away rather seamlessly.
I've never seen another game even try this and always wondered why because of its practicality and continuity solutions.
To directly answer, there's no definitive measure available. Demos are as long as they need be to acclimate a player to the highlight features whether they're graphics (Square-Enix - pick something), complex battle mechanics (Namco Bandai - "warriors"), depth in storytelling (level 5 - Ni No Kuni), soundstage (Ubisoft - Dead space) or historical influence (Koei - Nobunagas Revenge). So, I think you're asking too shallow a question and might want to think in terms of with what you're hoping to showcase and entice or engage the player.
Given RPGs aren't technically sandbox and also worth much while (IMO), steering away from a timed demo is probably a good idea as well.
As long as you adequately fulfill that goal, you're good.