We use scripts on KiXtart.org to slice and dice date and time to and from many formats.

All self contained scripts that just need to be called with the parameters of what you're looking for.