I may be misunderstanding something. However, just in case, I want to clarify the following:
dtoc() converts a date value to a character - which, if I understand correctly, is NOT what you ant.
ttod(), on the other hand, converts a datetime value to a date.
Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)