Formatting can occur in many places (server and client). And for text-boxes, the formatting may need to be removed/altered when storing back to the database. ASP.NET is much better in this area (well, most areas to be honest).
To format data going into a textbox, do this to the variable before assignment to the textbox.
When the user modifies the text, you need to use some CLIENT-SIDE javascript code.
For a hand-built INPUT box, you just add
onblur="myFormatFunction(this)"
onfocus="myUnFormatFunction(this)"
For a DTC, you need to 'advise' these events to each textbox
in the thisPage_onenter method:
txtDate.advise ("onblur", "dummy"

txtDate.advise ("onfocus", "dummy"
The "dummy" bit is meant to be the name of a Server-Side function - but we do not want it to go that far. So how do we prevent a Server Round-Trip?
Add a Client-Side code block with the following:
function thisPage_onbeforeserverevent(strObj, strEvt) {
if (strObj == "txtDate"

{
if (strEvt=="onblur"

{
myFormatFunction(document.thisForm.txtDate);
thisPage.cancelEvent = true
}
if (strEvt=="onfocus"

{
myUnFormatFunction(document.thisForm.txtDate);
thisPage.cancelEvent = true
}
}
}
Note1: The parameters (strObj, strEvt) are not added by VisualInderdev if you double-click this event in the Script Outline View.
Note2: VisualInterdev does not pop-up the DTC textbox names - but they ARE valid. So just spell them correctly!
You could put the format / unformat functions in a separate javascript file that you include in the client page.
<script language="JavaScript"
src="../include/FormatFunctions.js">
</script>
You would need similar functions on the server-side code too. You would include them as
<!--#INCLUDE FILE="../include/FormatFunctions.asp"-->
(Content Management)