var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: URGENT PLZ: Problem in date field.
can you please help me with this...
I am reading from the database using this code:
$billing_sql = "SELECT billing.billing_id, billing.detail, billing.start_date_time, billing.amount FROM customers INNER JOIN (accounts INNER JOIN billing ON accounts.account_id = billing.account_id) ON customers.customer_id = accounts.customer_id WHERE customers.customer_id = '".$_SESSION['customer_id']."' AND billing.entry_type IN(1,2,5,6,7,8) ORDER BY start_date_time desc LIMIT 10";
$billing_result = pg_exec($pg_connection, $billing_sql);
$billing_date_time = pg_result($billing_result, $i, 2);
but the date is stored in GMT and my local date is GMT+3
I am not sure of the exact syntax but you should be able to just add 3 to the time. If I recall correctly you can add to the timestamp in the sql query. Not 100% sure on this but its worth a shot. And if it doesn't work, then you should see if you can change the timezone on the db. There should be some good threads around about db timezones and how to manipulate them
Hope this helps
I am not getting the correct +3 date when adding 3 to teh timestamp because it's for date and time as well and i just need to add +3 on the date
what database is this? and what is the exact datatype of the start_date_time column?
database is PostgreSQL
I don't have access to tha database today because I am off but if i can remember it's timestamp
select start_date_time + interval '3 hours'
yes it worked
thank you very much