import module namespace dt = "http://www.zorba-xquery.com/modules/datetime"; let $buf := "Friday, December 28, 2012, 08:00:00 PST" return dt:parse-dateTime( $buf, "%A, %B %d, %Y, %T %Z", "en-US" ) (: Example configuration (taken from zorba testsuite): Result: /builddir/build/BUILD/zorba-2.9.1/test/rbkt/ExpQueryResults/zorba/datetime/datetime-parse-dateTime-uAB-ld-uYTZ-1.xml.res Error: http://www.zorba-xquery.com/errors:ZOSE0007 --------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------- Expected output: 2012-12-28T08:00:00-08:00 :)