IdleTymes Blog

Personal Diary, Musing and rubish of a F*!^%#g bored programmer.

Say you had to insert in a datetime field in a database but the form in which you recieve the date is different to what is normally accepted:

Well here is a example I have use to get it accept a new date format:

SET DATEFORMAT dmy; INSERT INTO TransIt (ActionDate) Values (`28/07/2003 14:22:28`)

Hence converting from American to English in one three word command, none of that tacky VB stuff!


Comments are closed.