I think is doable? The slightly tricky part is determining whether the passed-in value is date or timestamp.