Timezone Offset to timezone conversion
Hi ,
I have timezone offset +6:00 which is coming from xml.
how to get time zone from it.
This looks very wrong. Java Date objects ALWAYS store the date as the number of milliseconds since 1st Jan 1970 UTC. They have no timezone component other than that implied by the UTC.
Your method public static Date toGMTDate(Date date1, TimeZone tz1)implies that you can create a Date with a Timezone other than UTC. You can't.
The only time a Timezone is involved is when you convert the Date to a String for display and then the Timezone is that specified in SimpleDateFormat or the local timezone if one is not not specified.
Similar Messages
-
Urgent : Timezone conversion issue
Hi,
I am having an issue in timezone conversion.Im trying to convert a date type value to server timzone before insert into table. Im writing the conversion code in validateEntity(). Im using OANLSServices methods for conversion.Since i have to pass java.util.Date to this convertTimezone() as first parameter(date to be converted),im converting the reqd date which is in oracle Date type to java util Date type. Function is returing java.util.date type, which is again converted to oracle Date type. then im passing this value to the setMethod, ie., setJoiningDate(Date ) in my case.
the code is compiled with 0 errors. But wen i run the page and after entering date value and click save button , its throwing some exception like "oracle.jbo.ValidationException: JBO-28200: Validation threshold limit reached. Invalid Entities still in cache"
and in the debug console, this code in the validateEntity() is executed 10 times. First time it is converting the date time value to date only format, then same this is executed 9 more times. Can anyone help to resolve this issue? Its very urgent.
Thanks
HarshaHarsha,
Use this code and try again...!
oracle.jbo.domain.Date join = getJoiningDate();
// to convert oracle Date to Java util Date
java.sql.Date joinSql =(java.sql.Date)join.dateValue();
java.util.Date jdateUtil =
getOADBTransaction().getOANLSServices().convertTimezone(joinSql,
getOADBTransaction().getOANLSServices().getUserTimeZoneCode(),
getOADBTransaction().getOANLSServices().getServerTimeZoneCode());
// to convert back to oracle Date
java.sql.Date jdateSql = new java.sql.Date(jdateUtil.getTime());
oracle.jbo.domain.Date jdate = new oracle.jbo.domain.Date(jdateSql);
setJoiningDate(jdate);
--Mukul -
I have a requirment in which the database server time is being changed to GMT but one of the database users needs to store its data in CST or CDT as the case may be depending on daylight savings .I am thinking of writing a function which returns depending on date value passed on to it whether it is CST or CDT (depending on the day of the year ) and thiS function would be called from a before insert trigger for the tables so that the date data being passed on GMT time is converted back to CST or CDT before storing and stored as such then .Is this the best approach ,does oracle have a system function for this ? NEW_TIME is the function that I am aware of for timezone conversion however it doesnt take into consideration if it is CST or CDT .Thanks
What is the datatype - date, timestamp, timestamp with timezone?
There are ways of converting the date which includes daylight savings time considerations;
SQL> select sessiontimezone from dual
SESSIONTIMEZONE
-08:00
1 row selected.
SQL> create table t(ts timestamp)
Table created.
SQL> insert into t values(to_timestamp('01-jun-2007 12:00:00', 'dd-mon-yyyy hh24:mi:ss'))
1 row created.
SQL> insert into t values(to_timestamp('01-dec-2007 12:00:00', 'dd-mon-yyyy hh24:mi:ss'))
1 row created.
SQL> SELECT ts,
ts AT TIME ZONE 'UTC' utz,
ts AT TIME ZONE 'Canada/Central' ctz
FROM t
TS UTZ CTZ
2007-06-01 12:00:00,000000 2007-06-01 20:00:00,000000 +00:00 2007-06-01 15:00:00,000000 -05:00
2007-12-01 12:00:00,000000 2007-12-01 20:00:00,000000 +00:00 2007-12-01 14:00:00,000000 -06:00 -
Timezone conversion mapping file
Anyone happen to know where this file may be? I've done a little more than a quick search and have not found it yet. Need to update the file and define a timezone.
I found the solution on this. It involved updating the DTS to a later version and a couple other patches.
-
I have a file whose last modified date is in EST.
I want to convert the time to CST.
Can someone help?I have a file whose last modified date is in EST.No. The last modified date isn't in any TZ. It's just a point in time, an offest relative to 1/1/1970 00:00:00.000 GMT.
I want to convert the time to CST.You mean you want to display that instant in time in CST.
import java.text.*;
DateFormat df = DateFormat.getDateTimeInstance(DateFormat.FULL, DateFormat.FULL);
df.setTimeZone(TimeZone.getTimeZone("CST");
String dateStr = df.format(date);
Calculating Java dates: Take the time to learn how to create and use dates
Formatting a Date Using a Custom Format
Parsing a Date Using a Custom Format -
Hi,
I have application which accepts a date-time and time zone as two different fields. I want to convert user entered date-time from user entered timezone to PST before storing it in DB. I am using below statement to do it -
to_char(convert_time(to_timestamp(:P9_UPD_DHQA_DATE,'dd-MON-yy hh24:mi'),:P9_TIMEZONE,'US/Pacific'),'dd-MON-yyyy hh24:mi');
-- with to_char converting timestamp with timezone type to varchar so that I can store it in timestamp field
convert_time function code -
create or replace
function convert_time ( datetime in timestamp, tz1 in varchar2, tz2 in varchar2 )
return timestamp with time zone
as
retval timestamp with time zone;
begin
retval := from_tz(datetime, tz1) at time zone tz2;
return retval;
end;
Reference - [http://www.devx.com/dbzone/Article/30501/0/page/3|http://www.devx.com/dbzone/Article/30501/0/page/3]
sample data -
:P9_UPD_DHQA_DATE : = '01-JAN-10 07:00'
:P9_TIMEZONE := 'US/Eastern'
Timestamp value in DB is stored as - 01-JAN-20 10.04.00.000000 AM (table column is timestamp type in DB)
(observe year and hours)
-- my SQL statement will look like this :
update M7_DHQA_FEATURES set DHQA_SCHEDULED_DATE = :P9_UPD_DHQA_DATE WHERE id = APEX_APPLICATION.G_F10(i);
But if I execute same SQL in SQL Work shop, I am getting below output -
select to_char(convert_time(to_timestamp('01-JAN-2010 07:00','dd-MON-yy hh24:mi'),'US/Eastern','US/Pacific'),'dd-MON-yy hh24:mi') "dd" from dual;
+01-JAN-10 04.00.00.000000000 AM US/PACIFIC+
Another note is that if I execute update command with user entered value directly (i.e., without any timezone manipulations), I don't see any issues with year and hours.
Can anyone tell me where I am going wrong and how to resolve the issue?
Thanks,
Krishna
Edited by: user475761 on Jun 26, 2009 7:10 PMMy page process complete code is below for any of those interested to look at code -
FOR I in 1..APEX_APPLICATION.G_F10.COUNT LOOP
if :P9_UPD_DHQA_STATUS <> 'No Change' then
update M7_DHQA_FEATURES set RESULT = :P9_UPD_DHQA_STATUS WHERE id = APEX_APPLICATION.G_F10(i);
end if;
if :P9_UPD_DHQA_DATE is not null then
:P9_UPD_DHQA_DATE := to_char(convert_time(to_timestamp(v('P9_UPD_DHQA_DATE'),'dd-MON-yyyy hh24:mi'),:P9_TIMEZONE,'US/Pacific'),'dd-MON-yyyy hh24:mi');
update M7_DHQA_FEATURES set DHQA_SCHEDULED_DATE = :P9_UPD_DHQA_DATE WHERE id = APEX_APPLICATION.G_F10(i);
end if;
END LOOP;
--------------------------------------------------------------------------------------------------------------------- -
TZ database and oracle timezone conversions
Hi There,
I was wondering if oracle has any inbuilt functionality to convert;
-- a given date in UTC
-- to a given timezone
-- considering the daylight savings
-- which (was/is/will) observe(d) on the target timezone at the time of the given date?
I have read oracle database uses TZ database, which means it should have access to all the historical timezone daylight saving variations on any given date in the past.
http://www.twinsun.com/tz/tz-link.htm
Is this possible? if so could anyone please given an example? I would like to create a function which takes a date in UTC and a target timezone and returns the date in target timezone considering the daylight saving which was observed during the input date.
I have to use this in a web based application (APEX). The application is capable of fetching the browser local timezone, so we have the target timezone, but then we also needs to know the historical daylight savings observation date ranges to correctly convert the past date.
Hope I am not confusing. Glad if anyone could throw some light hopefully with some examples.
I use Oracle 11gR2
Kind Regards
LigonWhat is the datatype - date, timestamp, timestamp with timezone?
There are ways of converting the date which includes daylight savings time considerations;
SQL> select sessiontimezone from dual
SESSIONTIMEZONE
-08:00
1 row selected.
SQL> create table t(ts timestamp)
Table created.
SQL> insert into t values(to_timestamp('01-jun-2007 12:00:00', 'dd-mon-yyyy hh24:mi:ss'))
1 row created.
SQL> insert into t values(to_timestamp('01-dec-2007 12:00:00', 'dd-mon-yyyy hh24:mi:ss'))
1 row created.
SQL> SELECT ts,
ts AT TIME ZONE 'UTC' utz,
ts AT TIME ZONE 'Canada/Central' ctz
FROM t
TS UTZ CTZ
2007-06-01 12:00:00,000000 2007-06-01 20:00:00,000000 +00:00 2007-06-01 15:00:00,000000 -05:00
2007-12-01 12:00:00,000000 2007-12-01 20:00:00,000000 +00:00 2007-12-01 14:00:00,000000 -06:00 -
Calendar/Date TimeZone conversion
Hi,
I am having problems trying to print a date. I am in the West Coast of the US and I want to display a specific time in GMT format. Unfortunately, the time is being displayed in PST and I cannot understand why. Here is what I'm doing:
I have created a Calendar object and set the year, month, day, hour, minute and second set to specific values. Before I set these values, I set the TimeZone for this Calendar object to GMT.
I am using the following piece of code to format this date in order to display it
return DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.SHORT).format(date_.getTime());
date_ : this is my Calendar Object
I think when I call the getTime() method, my system converts the time in GMT format back into the local system time format (ie PST). How can I get around this problem?
I would really appreciate any help from anyone.
Cheers.Here's what makes the difference. Instead of setting the time zone for the calendar instance try setting for the DateFormat instance. It will definetely work.
- Nirmal R.
Hi,
I am having problems trying to print a date. I am in
the West Coast of the US and I want to display a
specific time in GMT format. Unfortunately, the time
is being displayed in PST and I cannot understand why.
Here is what I'm doing:
I have created a Calendar object and set the year,
month, day, hour, minute and second set to specific
values. Before I set these values, I set the TimeZone
for this Calendar object to GMT.
I am using the following piece of code to format this
date in order to display it
return DateFormat.getDateTimeInstance(DateFormat.LONG,
DateFormat.SHORT).format(date_.getTime());
date_ : this is my Calendar Object
I think when I call the getTime() method, my system
converts the time in GMT format back into the local
system time format (ie PST). How can I get around this
problem?
I would really appreciate any help from anyone.
Cheers. -
How to reset TimeZone in oracle apps R12 instance?
Dear
I need to reset TimeZone in Oracle Apps R12 instance. When i ran Oracle Diagnostics,Java system properties report,i found that user.timezone=GMT-03:00.This is the reason showing time on Oracle Application Manager is wrong.
I need to reset to GMT+03:00, how do i reset the timezone?
Please help me.
Thanks
AteeqYes, the date is set properly at the OS level.
TimeZone values are as follows:
Profile Option Name Site
Client Timezone (GMT -06:00) Central Time
Enable Timezone Conversions No
JTF_CAL_DEFAULT_TIMEZONE 4
LE: Enable Legal Entity Timezone -
Server Timezone (GMT -06:00) Central Time
Service: Default value for Service Request Timezone type List Item Agent -
'send Timezone' setting in remote portlet web service
Our portlets don't render if we check the box 'send timezone' in the advanced settings section of a portlet's web service. It throws the following error in pt spy:<br><br><br>
*** PTBase.ThrowException *** (-2147024809) Error getting portlet content: Error beginning processing of this portlet: -2147024809 - Error in function CSPPortletProvider.BeginProcessing (lMode == 1, pUserSession == com.plumtree.server.impl.core.PTSession, pGadgetInfo == com.plumtree.server.impl.community.PTMyPortalGadgetInfo, pStates == com.plumtree.server.impl.core.PTStates, pAdminSettings == '[NOT TRACED]', vAppDataStateObject == com.plumtree.server.impl.core.PTState, pUserInterface == ): -2147024809 - AppDataState: missing required value TIMEZONE
com.plumtree.server.marshalers.PTException: -2147024809 - Error getting portlet content: Error beginning processing of this portlet: -2147024809 - Error in function CSPPortletProvider.BeginProcessing (lMode == 1, pUserSession == com.plumtree.server.impl.core.PTSession, pGadgetInfo == com.plumtree.server.impl.community.PTMyPortalGadgetInfo, pStates == com.plumtree.server.impl.core.PTStates, pAdminSettings == '[NOT TRACED]', vAppDataStateObject == com.plumtree.server.impl.core.PTState, pUserInterface == ): -2147024809 - AppDataState: missing required value TIMEZONE
com.plumtree.server.marshalers.PTException: -2147024809 - Error getting portlet content: Error beginning processing of this portlet: -2147024809 - Error in function CSPPortletProvider.BeginProcessing (lMode == 1, pUserSession == com.plumtree.server.impl.core.PTSession, pGadgetInfo == com.plumtree.server.impl.community.PTMyPortalGadgetInfo, pStates == com.plumtree.server.impl.core.PTStates, pAdminSettings == '[NOT TRACED]', vAppDataStateObject == com.plumtree.server.impl.core.PTState, pUserInterface == ): -2147024809 - AppDataState: missing required value TIMEZONE
at com.plumtree.server.impl.core.PTBase.ThrowException(String message, Int32 errorCode) in e:\buildroot\Release\portalserver\6.1.x\portalobjects\build\x86\src\dotnet\com\plumtree\server\impl\core\PTBase.cs:line 87
at com.plumtree.server.impl.community.PTMyPortalGadgetContent.GetContent(Int32 nIndex) in e:\buildroot\Release\portalserver\6.1.x\portalobjects\build\x86\src\dotnet\com\plumtree\server\impl\community\PTMyPortalGadgetContent.cs:line 411
at com.plumtree.portalpages.browsing.myportal.MyPortalModel.GetPortletHTMLTextFromIndex(Int32 nPortletIndex) in C:\plumtree_ui_source\portalui\6.1.x\ptwebui\portalpages\dotnet\prod\src\com\plumtree\portalpages\browsing\myportal\MyPortalModel.cs:line 385
at com.bea.alui.liquidskin.styles.overrides.STYLES_BodyAreaView.PortletContent(Int32 nPortletIndex, Int32 nColumnID)
at com.bea.alui.liquidskin.styles.overrides.STYLES_BodyAreaView.PageColumnTable(Int32 nColumnID, Boolean bContainsFreeFormContent)
at com.bea.alui.liquidskin.styles.overrides.STYLES_BodyAreaView.ThreeColumns(Int32 _nPageType)
at com.bea.alui.liquidskin.styles.overrides.STYLES_BodyAreaView.Display()
at com.bea.alui.liquidskin.styles.overrides.STYLES_MyPortalDP.PageDisplay()
at com.bea.alui.liquidskin.styles.overrides.STYLES_MyPortalDP.DisplayBody(Int32 nNavScheme)
at com.bea.alui.liquidskin.styles.overrides.STYLES_MyPortalDP.Display(IWebData pageData)
at com.plumtree.uiinfrastructure.interpreter.Interpreter.HandleDisplayPage(Redirect myRedirect, RequestData tempData) in e:\buildroot\Release\uiinfrastructure\6.1.x\dotnet\prod\src\com\plumtree\uiinfrastructure\interpreter\Interpreter.cs:line 1829
at com.plumtree.uiinfrastructure.interpreter.Interpreter.HandleRequest(IXPRequest request, IXPResponse response, ISessionManager session, IApplication application) in e:\buildroot\Release\uiinfrastructure\6.1.x\dotnet\prod\src\com\plumtree\uiinfrastructure\interpreter\Interpreter.cs:line 525
at com.plumtree.uiinfrastructure.interpreter.Interpreter.DoService(IXPRequest request, IXPResponse response, ISessionManager session, IApplication application) in e:\buildroot\Release\uiinfrastructure\6.1.x\dotnet\prod\src\com\plumtree\uiinfrastructure\interpreter\Interpreter.cs:line 169
at com.plumtree.uiinfrastructure.web.XPPage.Service(HttpRequest httpRequest, HttpResponse httpResponse, HttpSessionState httpSession, HttpApplicationState httpApplication) in e:\buildroot\Release\httpmemorymanagement\6.1.x\dotNET\src\com\plumtree\uiinfrastructure\web\XPPage.cs:line 82
at com.plumtree.portaluiinfrastructure.activityspace.PlumHandler.ProcessRequest(HttpContext context) in C:\plumtree_ui_source\portalui\6.1.x\ptwebui\portal\dotnet\prod\src\web\PlumHandler.cs:line 37
at System.Web.CallHandlerExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
at System.Web.HttpApplication.ResumeSteps(Exception error)
at System.Web.HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData)
at System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr)
at System.Web.HttpRuntime.ProcessRequest(HttpWorkerRequest wr)
at System.Web.Hosting.ISAPIRuntime.ProcessRequest(IntPtr ecb, Int32 iWRType)
<br><br><br>
Where do I config the timezone in my portal config so I won't get this error if I want to send the timezone?You have to do this programatically. See the thread
Re: Urgent : Timezone conversion issue
--Mukul -
Hi All,
How can I convert the standard time zones like EST,MST, EDT in to IST(Indian Standard Format)?
Thanks in advance.
Regards,
Ram.SELECT SYS_EXTRACT_UTC(SYSTIMESTAMP) + (5.5/24) from dual;Similar post on timezone conversion : Re: Difference calculation Indian and Irish time.
-
Timezone setting in OA Framework (Self Service Page)
Dear All,
Even after setting the 'Client Timezone' profile option at the responsibility level, I am not able to get the date fields having date picker in the User Interface (Custom developed Self Service Web page) taking up the value of the particular timezone that is assigned to the responsibility, instead its taking up the local machines date and time...??
How can I populate a Local Timezone value to a date field in OA Framework?
Appreciate your kind attention to this...
Many thanks in Advance....You have to do this programatically. See the thread
Re: Urgent : Timezone conversion issue
--Mukul -
Time Zone issues EDT to PDT conversion. Really need help!
Have a question regarding conversion from EDT to PDT time zones and on different Java versions...
If you compile the program below and run it using JRE 1.6, 1.5 versus 1.4, 1.3 it gives different results. Maybe somebody has an answer:
Here is the code:
import java.text.*;
import java.util.*;
public class Moh {
public static void main(String[] args) throws Exception {
SimpleDateFormat timestampFormatWithZone = new SimpleDateFormat("yyyy-MM-dd HH:mm z");
Date date = timestampFormatWithZone.parse("2007-06-06 14:00 EDT");
System.out.println(date.toString());
}Copile it and run using these two options. The one with
New York shall show you 2pm or 14:00 and when using the
second one output changes:
java -Duser.timezone=America/New_York Moh
java -Duser.timezone=America/Los_Angeles Moh
If you use JRE 1.6 or 1.5 second option will give you 12:00; if you
use JRE 1.4 or JRE 1.3 it will show 11am or 11:00
I think that 11am is correct! Is there any issues with newer JREs and timezone conversion. Or am I missing anything?
Thank you so much for your help!Yes, there are issues. See the following from Sun Microsystems
Sun(sm) Alert Notification
* Sun Alert ID: 102836
* Synopsis: Olson TZ Data (tzdata2005r or
greater) Incompatibility Issues
* Category: Availability
* Product: Java 2 Platform, Standard Edition
* BugIDs: 6466476, 6530336
* Avoidance: Upgrade
* State: Resolved
* Date Released: 08-Mar-2007
* Date Closed: 08-Mar-2007
* Date Modified:
1. Impact
The introduction of Olson Timezone (TZ) data,
version 2005r or greater, may break backward
compatibility for the Eastern, Hawaiian, and
Mountain time zones, under certain circumstances.
This issue is also outlined in Sun BugIDs 6466476
and 6530336, listed at:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6466476
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6530336
Note: The Hawaiian TZ is only affected for
historical data. Other American TZs such as PST and
CST are not affected.
2. Contributing Factors
This issue can occur in the following releases for
all platforms:
* JDK and JRE v1.4.2_12 and above
* JDK and JRE 5.0u8 and above
* JDK and JRE 6 and above
Notes:
1. Releases below Java SE v1.4.x are not affected
by this issue.
2. The condition will also exist if you have run
the "Time Zone Updater Tool" for v1.4.x+, but
without the -bc flag.
This condition will be apparent under one of the
following two circumstances:
A) The use of old 3-letter TZ IDs, limited to:
"EST", "HST", "MST".
Or:
B) The parsing of date strings containing one of the
following three TZ strings: "EDT", "HDT", or "MDT".
3. Symptoms
The symptoms/result of this condition will be that
Daylight Saving Time (DST) will be calculated
incorrectly.
4. Relief/Workaround
There is no workaround for this issue. Please see
the Resolution section below.
5. Resolution
To resolve this issue (ie. to enable support for the
backward compatible DST timezones), run the "Time
Zone Updater Tool" for v1.4.x+ with the command line
options:
-f -bc
Complete instructions for running the tool can be
found at:
http://java.sun.com/javase/tzupdater_README.html
Note: If you have already run without the -bc flag,
you will need to rerun with the -f -bc flag to
correctly resolve the 3-letter TZ abbreviation issue.
The -bc options will result in the deletion of the
files:
* JAVAHOME/jre/lib/zi/EST
* JAVAHOME/jre/lib/zi/MST
* JAVAHOME/jre/lib/zi/HST
There are no known side effects to removing these files.
Install Issues :
In the unlikely event of unforeseen issues (e.g:
such as power loss or I/O Error) restore the JRE
Time Zone files to their original state by:
A) following the instructions at
http://java.sun.com/javase/tzupdater_README.html#remove
Or:
B) removing and then reinstalling the JRE or JDK.
The update may now be re-applied by running the TZ
Updater Tool (with the proper command line options)
as listed above.
For additional information on issues, products, and
resources for DST changes, please also see:
http://www.sun.com/dst
This Sun Alert notification is being provided to you
on an "AS IS" basis. This Sun Alert notification may
contain information provided by third parties. The
issues described in this Sun Alert notification may
or may not impact your system(s). Sun makes no
representations, warranties, or guarantees as to the
information contained herein. ANY AND ALL
WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT
LIMITATION WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT, ARE
HEREBY DISCLAIMED. BY ACCESSING THIS DOCUMENT YOU
ACKNOWLEDGE THAT SUN SHALL IN NO EVENT BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, PUNITIVE, OR
CONSEQUENTIAL DAMAGES THAT ARISE OUT OF YOUR USE OR
FAILURE TO USE THE INFORMATION CONTAINED HEREIN.
This Sun Alert notification contains Sun proprietary
and confidential information. It is being provided
to you pursuant to the provisions of your agreement
to purchase services from Sun, or, if you do not
have such an agreement, the Sun.com Terms of Use.
This Sun Alert notification may only be used for the
purposes contemplated by these agreements.
Copyright 2000-2006 Sun Microsystems, Inc., 4150
Network Circle, Santa Clara, CA 95054 U.S.A. All
rights reserved. -
Hi,
by definition timestmaps provide date/time in UTC. With knowledge of the timezone it should be possible to calculate the local date and time explicitly. But there is no such function available in HANA. I have a timestamp field on the DB (data type DEC15 or DEC21) and want to provide an additional calculated field, showing local date, or local date/time. There is function UTCTOLOCAL, but this requires wrong importing data formats:
utctolocal(datearg,timezonearg) since it requires a datearg instead of a DEC field. It is obvious, that a correct conversion is not possible without specifying the time additionally.
How am I able to convert a timestamp into DATE and TIME fields?
Thanks and regards,
UlfHi Ulf
Yep, could be that this is not doable in a calculated attribute in an analytic view...
It perfectly works in SQL, so maybe you need to change your tool here.
create column table weired_timestamp (w_ts decimal (15,0))
insert into weired_timestamp values (20140305225959)
select w_ts, to_date(w_ts), to_time(w_ts), to_timestamp (w_ts) from weired_timestamp
W_TS
TO_DATE(W_TS)
TO_TIME(W_TS)
TO_TIMESTAMP(W_TS)
20140305225959
2014-03-05
22:59:59
2014-03-05 22:59:59.0
With that you can move on with the timezone conversion.
If wonder, why
1) the documentation provides a hard coded example only that is not really helpful :
"SELECT UTCTOLOCAL (TO_TIMESTAMP('2012-01-01 01:00:00', 'YYYY-MM-DD HH24:MI:SS'), 'EST') "utctolocal" FROM DUMMY;
instead of a real scenario.
Well, obviously the person who wrote this hadn't had your scenario in mind.
As you're SAP internal, why don't you just provide feedback on that to the documentation team, maybe even providing an improved real-life example?
2) the documentation doesn't refer to both scenarios, SELECTS and calculated fields in views
Likely because it's the SQL reference we are talking about here. But again, that can be a valid point for improvement - mention it to the documentation development team.
3) the HANA documentation is wrong since utctolocal(datearg,timezonearg) should be
utctolocal(timestamparg,timezonearg) including the missing information how to convert ABAP timestamps (DEC) into HANA timestamps (whatever it is?).
Sorry, I don't get this.
HANA provides a specific SQL compliant data type called "timestamp". This is what the functions work upon and that is what the documentation is about.
HANA is a general DBMS platform that is not just there to support the odd ends of ABAP data modelling and encoding.
I agree that there should be documentation on how to deal with ABAP data types when working without an application server. However, this shouldn't be part of the general DB documentation.
Not sure if these things are already part of any ABAP on HANA education material, but the SoH content development teams surely have come across these things and very likely documented them.
As SAP employee you got access to that, so maybe this would be a good place to look for this kind of information for you.
If you still feel this is a bug, fell free and open a internal message on that.
- Lars -
22-Frame Quicktime Conversion sych error
Does anybody know about this anomaly?
On certain clips in a heavily-edited sequence, the QT-converted output file contains clips with the audio out of synch. On the examples I've tested, the error is video 22 frames ahead of audio.
The workaround is to locate the OOS clips in the output file, then move the audio in FCP ahead by 22 frames. Works!
But why does this happen in the first place? Who else had has this experience?I have experienced the same thing, there is a lag in offsets using QuickTime Conversion.
Most recently, I noticed it when exporting a still image through QuickTime Conversion. The canvas will actually change approximately 22 frames when you open the Export - QuickTime Conversion window so you can preview this error while you are going through the motions. (I noticed it was about 25 frames, but I did not do a rigorous test.)
In another example, the video actually scratched backward during the QuickTime clip causing it to go out of sync with the audio.
In general, I have not used Quicktime Converion successfully since upgrading to HDV. Relying instead on Compressor, but missing out on some of the ease, convenience, and other options available through Quicktime Conversion.
Anyone have any ideas? Does FCS 2 handle this stuff better?
Maybe you are looking for
-
Multiple links in a pdf document
i have a pdf document that is viewed online and has multiple links to it. I would like the customer to click the link and 2 things to happen. 1. a web page opens, and 2. a sepearte pdf opens so that when you close the pdf, the web page is the active
-
Download to excel issue.
Hi All, When I download a report to excel, one of my percent field with one decimal place, is increased to two decimal places in excel. does anyone of a work around or a fix to this issue? Thanks
-
Looking for a manual for the Historical Data Viewer Lookout 6.1
Is there a manual on the Historical Data Viewer (Measurement and Automation Explorer)? I have never logged any analog data, but want to log (to historical data) the battery voltage at a remote site during a power outage. I have the object established
-
Saving MIDI edits in GB3 - is it possible?
Don't see any obvious way via Save/Save As options. Love how easy it is to edit MIDI in GB, ashame you can't save it in anything other than proprietary GB .band or as an iTunes/iPod file... ;-( And is there a way to play an imported .mid through an e
-
When I open digital editions it does not list my device. Nexus 7 tablet