From: Nirgal V. <con...@ni...> - 2011-02-07 22:37:00
|
Hi again I've been annoyed for a long time with some dates being not supported by postgresql, or so I though. I'm talking about dates before 1000 AD. I though postgres refused them. But there is a work around: You simply have to have a 4 digit year. For example 201-01-01T00:00:00 will fail, but 0201-01-01T00:00:00 is ok. Unfortunatly, I was not able to find a strftime format for this. So now, I'm using: mdb-export -D "{postgresdate}%Y-%m-%d %H:%M:%S" "$MDB" "$table" | sed -re 's/\{postgresdate\}([0-9]{2})-/00\1-/g' | sed -re 's/\{postgresdate\}([0-9]{3})-/0\1-/g' | sed -re 's/\{postgresdate\}//g Cheers |