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


Recent Events
  • 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.

  • 21/11/2023 BLACK FRIDAY 23 is coming

    BIG SALE, 35% discount for all our extensions. Use BF23 coupon code. Hurry up the discount is valid till 27 November.


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?

SQL Server Time
(1 viewing) (1) Guest
Go to bottomPage: 1
TOPIC: SQL Server Time
#48001
SQL Server Time 10 Years, 4 Months ago Karma: 0
Is there a way to offset the time in a SQL query?

The SQL Server is on a shared server where the time is set to UTC.

The Joomla Server Time is "America/Los_Angeles"

I am charting a count of articles posted on a date but since there is an 8 hour offset between UTC and America/Los_Angeles, my charts are not in sync.

Here is my current SQL Query:
SELECT
DATE_FORMAT(created,'%a-%d') as CREATED, count(created) as Date
FROM #__content
WHERE CatId = 15
AND created >= curdate() - interval 6 day
GROUP BY date(created);
The administrator has disabled public write access.
 
#48002
Re:SQL Server Time 10 Years, 4 Months ago Karma: 748
Hello,

See CONVERT_TZ MySQL function.

Regards,
ARI Soft
The administrator has disabled public write access.
 
Go to topPage: 1