条件查询
psql.Append(string.Format(" and createday between {0} and {1}", this.txtCreatedayEnd.Text, this.txtCreatedayStart.Text));
麻烦各位大虾帮忙看看这条语句这样写有错吗?为什么查不出来数据啊,createday是一个时间类型,我想用这条语句查出符合条件的在某一时间段中的数据。
[解决办法]
psql.Append(string.Format(" and createday between '{0}' and '{1}'", this.txtCreatedayEnd.Text, this.txtCreatedayStart.Text));