Help to convert PostgreSQL dates into SQL Server dates

Posted by Earlz on Stack Overflow See other posts from Stack Overflow or by Earlz
Published on 2010-05-26T20:15:50Z Indexed on 2010/05/26 20:21 UTC
Read the original article Hit count: 267

Filed under:
|
|

Hello I'm doing some data conversion from PostgreSQL to Microsoft SQL Server. So far it has all went well and I almost have the entire database dump script running. There is only one thing that is now messed up: dates.

The dates are dumped to a string format. These are two example formats I've seen so far: '2008-01-14 12:00:00' and the more precise '2010-04-09 12:23:45.26525'

I would like a regex (or set of regexs) that I could run so that will replace these with SQL Server compatible dates. Anyone know how I can do that?

© Stack Overflow or respective owner

Related posts about sql-server

Related posts about regex