Page 1 of 1

ExecuteScalar returns TimeSpan for Interval

Posted: Thu 30 Jun 2005 13:13
by szinkopa
I ran this:

Cmd.CommandText="select cast('1 year' as interval)";
object o=Cmd.ExecuteScalar();


The debugger shows that o contains a TimeSpan, so the year component goes away. This should return PgSqlInterval, shouldn't it?

ExecuteScalar returns TimeSpan for Interval

Posted: Thu 30 Jun 2005 15:52
by Yuri
Please use method PgSqlDataReader.GetPgSqlInterval() method to obtain a PgSqlInterval value.