Not many people know this but you can get a 24-hour "transit visa" on the spot at the airport. There is desk in the main passport control area where you do it. I did it with my girlfriend (now wife

) a year ago when we had an overnight in AMS.
There is no guarantee that they'll give it to you, and they'll ask why you didnt do it before hand. In our case we claimed we couldnt do it because the trip was on short-notice and her passport was in another embassy to get a visa for our final destination. They granted the visa.
It will also help if you have visas for other countries, for example the US, and you should point that out to them.
so you can always give this a shot, in the worst case you end up spending 12 hours in the airport...