As you posted in the VBScript forum:
oldValue = "YYYYMMDD"
newValue = "'" & Left(oldValue, 4) & "-" & Mid(oldValue, 5, 2) & "-" & Right(oldValue, 2) & "'"
Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886