This topic is locked

Days in stock

8/15/2008 8:05:09 AM
PHPRunner General questions
J
jskewes author

Hello,

I wander is someone could help me.

I am trying to add a Days in Stock field (to track aging inventory).
In MS Access the statement looks like this;

DateDiff("d",[Inputed],Now()) AS DIS
I have tried every way (but the right way) to make this work in PHPR.

Here is the current query that I am trying to modify.

I appreciate any help.

/john
SELECT

ID,

Series,

Make,

`ST#`,

`YEAR`,

MODEL,

MILES,

COLOR,

INTERIOR,

TRANS,

OPTIONS,

CPO,

PRICE,

`Sales Rep`,

Inputed,

Status,

Title,

Sold,

Notes,

VIN,

`Pruchased From`,

Origin,

Temp,

`TYPE`,

Customer,

AddedToWeb,

Archive

FROM cartable

WHERE Archive Not Like '1'

J
jskewes author 8/15/2008

Hello,

As is often the case I kept banging away.

Here is the solution I came up with.

If anyone has a more elegant way please share it with me.

DATEDIFF(CURDATE(),Inputed) AS DIS,
Thanks,

/john
Applied;
SELECT

DATEDIFF(CURDATE(),Inputed) AS DIS,

ID,

Series,

Make,

`ST#`,

`YEAR`,

MODEL,

MILES,

COLOR,

INTERIOR,

TRANS,

OPTIONS,

CPO,

PRICE,

`Sales Rep`,

Inputed,

Status,

Title,

Sold,

Notes,

VIN,

`Pruchased From`,

Origin,

Temp,

`TYPE`,

Customer,

AddedToWeb,

Archive

FROM cartable

WHERE Archive Not Like '1'