# Re: CrystalReport1.SelectionFormula = "{contract.contrdate} like '1999*'"

Posted by 小小 on July 22, 1999 at 10:01:38:

In Reply to: CrystalReport1.SelectionFormula = "{contract.contrdate} like '1999*'" posted by 恩恩 on July 22, 1999 at 00:32:07:

: 小女子初学vb6, 请问各位大兄如果我想将
: CrystalReport1.SelectionFormula = "{contract.contrdate} like '1999*'"
: 其中1999 变做一个variable 如 year.
: 应该点做?
: 我试过
: CrystalReport1.SelectionFormula = "{contract.contrdate} like 'year*'"
: and
: CrystalReport1.SelectionFormula = "{contract.contrdate} like year*"
: 都唔得!!!

妳知道如果要选择某日的资料, 格式是如何的吗!

crystalreport1.selectionformula="{contract.contrdate}=date(1999,07,22)"

如果妳只是想要年份, 试一试以下公式或加以改变,

crystalreport.selectionformula="year{contract.contrdate}=1999"

希望可以帮妳一把.

Follow Ups: