can someone provide query to convert SYSDATE from ...
# suiteql
r
can someone provide query to convert SYSDATE from PST timezone to IST timezone in the below query?
Copy code
SELECT 
  SYSDATE as today, 
  id as internalid
FROM
  resourceallocation
WHERE
    startdate <= SYSDATE;
l
@raghav, can you try this? below query was working for me in case of transaction record
Copy code
SELECT
  SYSDATE as today_pst,
  SYSDATE + (12/24) + (30/(24*60)) as today_ist,
  id as internalid
FROM
  transaction
WHERE
  trandate <= (SYSDATE + (12/24) + (30/(24*60)));
Let me know if this works or not.
r
I did the same thing a bit back, added (750/1440) in the sysdate. Still hoping to find some solution which can change the datetime itself to IST timezone.
l
What exactly you are expecting?
r
The above thing is working for now. But wanted to know how we can convert a timezone itself for a datetime in SQL queries itself.
I was able to find for conversion of PST to GMT using but did not find something to change it to IST.
Copy code
to_char(new_time(SYSDATE,'PST','GMT'),'MM/DD/YY HH24:MI:SS')
to_char is just for better visibility in the UI.