minor fix for date convert func