PRIu64 + cast seems like an easy change that will work, no? by datetime string you mean the datetime SQL data type? that works too for me.