Making Sense Of Order Dates

Apologies if this has been answered elsewhere, but I can’t find anything in the documentation or forums about it (If it makes a difference, we are currently using CS-Cart 2.X).

I’m using SQL to pull information about orders from the database to update our accounting software. The query I have works fine, except that the software requires a date for when the order was paid for, and I don’t seem to be able to find this data.

As far as I can tell, the [font=courier new,courier,monospace]timestamp[/font] column in the [font=courier new,courier,monospace]cscart_orders[/font] table is the closest thing to this, but it appears that it’s reset every time the order status is changed, meaning that for some orders it’s not possible to use this time to determine date of payment. Is my understanding of the way that the [font=courier new,courier,monospace]timestamp[/font] field works correct? And if so, is there anywhere else where the information I’m after would be stored?

Thanks in advance. :)

timestamp should be the timestamp of when the order was created. It should not be being updated.

[quote name=‘tbirnseth’ timestamp=‘1393568611’ post=‘178482’]

timestamp should be the timestamp of when the order was created. It should not be being updated.


Are you certain about that?

I’m looking at orders where the timestamps are not the same as the date I know those orders were created. In some cases the orders are out of sequence when ordered by timestamp (which they shouldn’t be, if the timestamp is never changed) and in others large batches have identical timestamps (this happens when we bulk mark a day’s products as shipped).

Here’s an image which illustrates this - the orders are ordered by date, but note that the order numbers are not ordered, and the big batch at the top which all share the same timestamp.

Then you have something on your site that is updating the timestamp that shouldn't. The timestamp is the order date (shown as the order date on order screens).

I know this is an old thread, just adding some info…Today I saw the same in my order history.

I imported a short list of backorders in my cs-cart installation. Import existed only of the two mandatory fields. After the import I added products and customer data in cs-cart. I found that in the cart_orders table the timestamp column was “0” for these orders. Seems that “0” timestamp will be seen as [Now] for the cs-cart system.


I added timestamps in the cart_orders table manually. Since then the order date is kept. There are websites that have timestamp generators. Easy to use.