Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Datetime & Char datatype

Author  Topic 

olily
Starting Member

37 Posts

Posted - 2002-06-27 : 19:45:39
I have a field declared as varchar(10) datatype. Can I format the field at runtime when there is a change to this field? For example, if original value is 5:00pm, then I would like to store as 17:00. Or if the value is 900am, then it would be stored as 9:00. I can't change the field format as this was designed by someone earlier and this system has been running for a year. Once a while I need to change the data manually whenever the value is not in hh:mm format.
Please advice.

nr
SQLTeam MVY

12543 Posts

Posted - 2002-06-27 : 20:01:30
You could do that via an update trigger.

==========================================
Cursors are useful if you don't know sql.
Beer is not cold and it isn't fizzy.
Go to Top of Page
   

- Advertisement -