How to convert datetime stamp to unix time in Crys

2019-07-27 10:43发布

问题:

I need to convert a datetime stamp to Unix time. I understand that this is not the easiest thing to do nor a common thing to do, but I need to do it. I have been searching for how to do this for a few hours.

回答1:

It turns out that you can use datediff("s", date("1970-01-01 00:00:00"), {date_column}) to get the unix time stamp in Crystal.