How To Convert Date To Epoch?

Hi, I have a epoch ‘expire’ property/column in DB that I display in CGridView formatted as Date, but search wont work because the search refers to the epoch time. How could I use Search function with Date format and transform it to epoch before search? Thanks!

One way is to convert the date to a timestamp in your search method. You’ll want to check that the property is set first and then convert it to a timestamp.