Yes, it can be really painfull – MSSQL (at least instance I’m using) is saving date in format “d/m/Y H:i:s” but in every part of code I had “Y-m-d H:i:s”. So what now – rewrite everything? Nope, there is ugly but working way to do it, after ADODb object is created and initialized put:

and that’s it – all dates will be internally converted to given format, so here is full example of config:

At first look it was simple, just:

but, this way we can get ONLY posts, not pages. To get both posts AND pages just add:

in WP_Query arguments list so it will look like this:

And voila – we have both content types.