Home News Contact Us Forum About Us Demos Products F.A.Q.
Shopping Cart
You currently have 0 items in your cart.


Recent Events
  • 23/11/2024 Black Friday 2024

    BIG SALE, 30% discount for all our extensions. Use BF24 coupon code. Hurry up the discount is valid till 3 December.

  • 31/12/2023 New Year SALE

    We are glad to announce New Year SALE. 25% discount for all our extensions. Use NY24 coupon code. Hurry up the discount is valid till 7 January.


2Checkout.com, Inc. is an authorized retailer of goods and services provided by ARI Soft. 2CheckOut




Follow us on twitter



Welcome, Guest
Please Login or Register.    Lost Password?

Date conversion in sql
(1 viewing) (1) Guest
Go to bottomPage: 1
TOPIC: Date conversion in sql
#35653
Date conversion in sql 11 Years, 10 Months ago Karma: 0
Hi, I'm stuck with converting a server date within an sql query - here is the query -

Select
`Order Number`.order_modified AS Date,

`Order Number`.order_full_price As Amount,
xdfg_hikashop_product.product_name As `Order Details`,
`Order product`.code_photo,
`Order Number`.order_invoice_number As Invoice
From
xdfg_hikashop_order `Order Number` Inner Join
xdfg_hikashop_order_product `Order product` On `Order Number`.order_id =
`Order product`.order_id Inner Join
xdfg_hikashop_product On `Order product`.product_id =
xdfg_hikashop_product.product_id Inner Join
xdfg_hikashop_user On xdfg_hikashop_user.user_id =
`Order Number`.order_user_id Inner Join
xdfg_users Users On Users.id = xdfg_hikashop_user.user_cms_id
Where
Users.id = {$userid}

the order_modified query returns a date like this - 1358032117 which I'm guessing is the server time format. How can I convert this within the statement to something like 16th January 2013 ??

Have been trawling the internet for several hours to find a solution!
Many thanks,

Derek

p.s. wonderful module, solved a whole heap of issues for me!
Last Edit: 2013/01/13 02:15 By Goldingarts.
The administrator has disabled public write access.
 
#35654
Re:Date conversion in sql 11 Years, 10 Months ago Karma: 0
Got it!


FROM_UNIXTIME(`Order Number`.order_modified,'%D %M %Y') As Date,
The administrator has disabled public write access.
 
Go to topPage: 1