Converting date value one day less while transfering from client to server
Hi,
I have very typical problem. My application is in java, we are using oralce 9ias. The problem when the server is running in german locale and client is running in english. We the date value is passed from client to server it is converting to one day less.
i.e.
If i want to search with records jan 02,2005,
on server side if we print the value it is getting as jan 01,2005.
Can anybody help me in solving the above problem.
Its bit very urgent.
Thanks in advance
regards
Kalyan
// to get current time in Germany
Calendar cal = new GregorianCalendar(TimeZone.getTimeZone("Germany"));
int hour12 = cal.get(Calendar.HOUR);
int minutes = cal.get(Calendar.MINUTE);
int seconds = cal.get(Calendar.SECOND);
boolean am = cal.get(Calendar.AM_PM) == Calendar.AM;
//I think all you need to do is to set the timezone to the current, so that when the
//server at some other timezone gets this date it knows that this date belongs to
//different timezone and gets converted automatically according to the server
//timezone settings.
// Set the current local timezone
cal.setTimeZone(TimeZone.getDefault());
int hour24 = cal.get(Calendar.HOUR);
Hope this answers your question. Good luck.
-Sreekanth varidhireddy
Similar Messages
-
Date converting to less one day while transferring from client to server
Hi,
I have very typical problem. My application is in java, we are using oralce 9ias. The problem when the server is running in german locale and client is running in english. We the date value is passed from client to server it is converting to one day less.
i.e.
If i want to search with records jan 02,2005,
on server side if we print the value it is getting as jan 01,2005.
Can anybody help me in solving the above problem.
Its bit very urgent.
Thanks in advance
regards
Kalyanwell, i have had nightmares with this problem. here are the reason and soln:
reason:
in ur DB, u r using a field "Date" which does not include time information. Hence, any date will be taken at 00:00:00. If such a date is opened in some other timezone, which is ahead of the server timezone, the date differs by one. This is becoz java always considers the millisecond info encapsulated in the date, calendar.
soln:
Step 1:
u must be able to get the "timeZoneOffset" from a calendar object. This timeZoneOffset will give the number of minutes/seconds/hours... by which the system is offset from GMT.
Thus if u create a calendar in India, the timeZoneOffset will be 330. If you create the calendar in UK, it will be 0.
To achieve this, we have made an object-UTCDate. This class encapsulates a Calendar. It has a function called "getTimeZoneOffset".
Step 2:
Once u get the timeZoneOffset, here is what u need to do in ur code. (assume that the timeZoneOffset is in minutes. the variable names will be self-explanatory)
at the client side code:
long timeInMillis = calendar.getTime().getTime() + (timeZoneOffsetOfTheCalendarReceivedFromServer * 60 * 1000 ) - (timeZoneOffsetOfClient * 60 * 60 )
use timeInMillis to make a new Date Object and use this date object.
at the server side code:
long timeInMillis = calendar.getTime().getTime() + (timeZoneOffsetOfTheCalendarReceivedFromClient * 60 * 1000 ) - (timeZoneOffsetOfServer * 60 * 60 )
hope this helps.
regards -
How to convert Date format into day in ssrs reports?
Hi
How to convert date format into day?
10/01/2010 as like Monday like that?=weekdayname(datepart("w",Fields!mydate.Value))
-Vaibhav Chaudhari -
Hi, I have a hard disk failure so to recover my data I am using disk utility to restore the data on an external drive while booting from a second external hard drive. When I perform the operation and after having selected both my destination and source drives, the operation begins but soon fails due to input/output error. If I try to create an image of the drive it gives me the same error message. Any help would be much appreciated.
Disk Utility only creates a image of the drive, so it's no help getting exactly what you want, which is your files. If the file structure is messed up or the drive is failing then it's no help.
If you have a external boot drive and you can't access the internal non-booting drive though the typical Finder and windows to transfer your files via drag and drop methods, then you need to install Data Rescue on the external boot drive and it will do as best as it can to recover your files. (works on non-encrypted/non-Filevaulted drives only)
.Create a data recovery/undelete external boot drive
Are you sure you have hard drive failure, or that OS X isn't merely not booting?
Because if the drive is working physically, then there is a host of fixes
..Step by Step to fix your Mac
https://discussions.apple.com/community/notebooks/macbook_pro?view=documents#/ -
How can one invoke a WebLogic EJB from a BPEL Server hosted on OC4J?
How can one invoke a WebLogic EJB from a BPEL Server hosted on OC4J?
Reason I ask is I keep getting this error:
javax.naming.NoInitialContextException: Cannot instantiate cla
ss: weblogic.jndi.WLInitialContextFactory [Root exception is java.lang.ClassNotF
oundException: weblogic.jndi.WLInitialContextFactory]
Note: I am using <bpelx:exec> as a way to execute some java program.
Essentially my java client (essentially an EJB client hosted on Oc4J) needs access to wlclient.jar since it needs access to weblogic.jndi.WLInitialContextFactory. I have a EJB client running on BPEL server hosted on Oc4J that needs to access some EJBs hosted on weblogic.
Where do I place this wlclient.jar so that BPEL PM can start peacefully and at runtime discover the InitialContextFactory classes?
Placing it in the j2ee/home/applib doesn't solve the problem. The server fails to start up if I do this
I tried placing it in BPEL-INF\lib directory ...
I still get the same exception...see below for exception dump
I verified the BPEL suitcase, and it in fact does contain the jar file wlclient.jar
integration\orabpel\domains\default\deploy contains the bpel_BPELProcess2_1.0.jar file and snapshot of that is as follows:
<PRE>
│ bpel.xml
│ BPELProcess2.bpel
│ BPELProcess2.jpr
│ BPELProcess2.wsdl
│ bpel_BPELProcess2_1.0.jar
│ build.xml
│ buildxml.copy
│ graphics.xml
│
├───BPEL-INF
│ └───lib
│ myEJB.jar
│ wlclient.jar
│
├───META-INF
│ MANIFEST.MF
│
└───output
bpel_BPELProcess2_1.0.jar
</PRE>
I tried using the BPEL-INF\jar directory...Is this something the obant automatically detects? or do I have to modify the build.xml? I created this directory and let Jdev deploy to local BPEL server->default domain handle it
#####################3
I even tried copying the wlclient.jar to
integration\orabpel\system\classes but this doesn't help since the BPEL PM fails to start if I explode this jar into this directory.
In short,where do I place the wlclient.jar so that this exception can be contained.
I edited the build.xml to point to the jar, that too didn't work, unless I made some mistake in the file
<bpelc classpath="${basedir}/BPEL-INF/classes;${home}/system/classes;${home}/lib/j2ee_1.3.01.jar;${basedir}/BPEL-INF/jar/wlclient.jar" input="${basedir}/bpel.xml" rev="${rev}" deploy="${deploy}" />
</target>
</project>
DETAILS on ERROR
I get the following error
Process "BPELProcess2" (revision "1.0") successfully compiled.
<2005-12-14 09:17:55,770> <INFO> <default.collaxa.cube.engine.deployment> Proces
s "BPELProcess2" (revision "1.0") successfully loaded.
05/12/14 09:18:36 weblogic.jndi.WLInitialContextFactory
javax.naming.NoInitialContextException: Cannot instantiate cla
ss: weblogic.jndi.WLInitialContextFactory [Root exception is java.lang.ClassNotF
oundException: weblogic.jndi.WLInitialContextFactory]
05/12/14 09:18:36 at javax.naming.spi.NamingManager.getInitialContext(Nami
ngManager.java:652)
05/12/14 09:18:36 at javax.naming.InitialContext.getDefaultInitCtx(Initial
Context.java:243)
05/12/14 09:18:36 at javax.naming.InitialContext.init(InitialContext.java:
219)
05/12/14 09:18:36 at javax.naming.InitialContext.<init>(InitialContext.jav
a:195)
05/12/14 09:18:36 at com.ejb.test.MapFinder.getDefaultMapName(Map
Finder.java:37)
##################3
with the bpelx all I have is two lines of code that creates a java object and calls a method on it.
The method does this:
private String initialContextFactory = "weblogic.jndi.WLInitialContextFactory";
private String providerUrl = "t3://localhost:7001";
private String urlPkgPrefixes = "";
private String mapEjbJndiName = "ejb/mycompany/Redlands";
public String getDefaultMapName() {
try {
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY, getInitialContextFactory());
env.put(Context.PROVIDER_URL, getProviderUrl());
if (getUrlPkgPrefixes() != null && !getUrlPkgPrefixes().equals(""))
env.put(Context.URL_PKG_PREFIXES, getUrlPkgPrefixes());
System.out.println(" " + getInitialContextFactory());
System.out.println(" " + getProviderUrl());
System.out.println(" " + getUrlPkgPrefixes());
System.out.println(" " + getEjbName());
// Get a naming context
context = new InitialContext(env);
Object ms = context.lookup(getEjbName());
MyEJBHome home = (MyEJBHome ) PortableRemoteObject.narrow(ms, MyEJBHome.class);
myEjb = home.create();
return myEjb.getDefaultName();
} catch (RemoteException re){
System.out.println(re.getCause().getMessage());
catch (Exception ex) {
ex.printStackTrace();
return null; //if unable to resolve the context factory etc...
}I did exactly as you suggested. I edited the application.xml and added this
<library path="C:\ArcGIS\test\bea\wlclient.jar"/>
I didn't add weblogic because the needed classes were all in wlclient.jar
I also edited the BASE_OB_CLASSPATH to include this jar.
Here is the result when I just start BPEL PM Server. Somehow BPEL PM doesn't like to have wlclient.jar in its classpath during startup.
Failed to create "worker" bean; exception reported is: "javax.naming.NameNotFoun
dException: remaining name: env
at weblogic.j2eeclient.SimpleContext.lookup(SimpleContext.java:49)
at weblogic.j2eeclient.SimpleContext.lookup(SimpleContext.java:57)
at weblogic.j2eeclient.SimpleContext.lookup(SimpleContext.java:62)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at com.collaxa.cube.engine.ejb.impl.WorkerBean.ejbCreate(WorkerBean.java
:49)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.evermind.server.ejb.MessageDrivenHome.getInstance(MessageDrivenHo
me.java:1235)
at com.evermind.server.ejb.MessageDrivenHome$2.run(MessageDrivenHome.jav
a:1150)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(Relea
sableResourcePooledExecutor.java:186)
at java.lang.Thread.run(Thread.java:534)
<2005-12-29 13:39:05,281> <ERROR> <collaxa> <ServerManager::loadAllDomains>
ORABPEL START-UP ERROR!!!!!!!!
OraBPEL run-time system failed to start due to exception:
Could not initialize jms connection pool.
Could not initialize connection pool for connection factory "java:comp/env/jms/
ollaxa/BPELInvokerQueueFactory"; the reason is remaining name: env/jms/collaxa/
PELInvokerQueueFactory.
Note: So what I did was to removed the entry from application.xml and tried with just obsetenv.bat having the wlclient.jar added to it. This too failed!!
Here is a snapshot of the error I got.
Process "BPELProcess2" (revision "1.0") successfully compiled.
<2005-12-29 13:53:11,207> <INFO> <default.collaxa.cube.engine.deployment> Proces
s "BPELProcess2" (revision "1.0") successfully loaded.
05/12/29 13:53:32 Cannot instantiate class: weblogic.jndi.WLInitialContextFactor
y
05/12/29 13:53:32 javax.naming.NoInitialContextException: Cannot instantiate cla
ss: weblogic.jndi.WLInitialContextFactory [Root exception is java.lang.ClassNotF
oundException: weblogic.jndi.WLInitialContextFactory]
05/12/29 13:53:32 at javax.naming.spi.NamingManager.getInitialContext(Nami
ngManager.java:652)
05/12/29 13:53:32 at javax.naming.InitialContext.getDefaultInitCtx(Initial
Context.java:243)
05/12/29 13:53:32 at javax.naming.InitialContext.init(InitialContext.java:
219)
05/12/29 13:53:32 at javax.naming.InitialContext.<init>(InitialContext.jav
a:195)
05/12/29 13:53:32 at com.esri.adf.ejb.test.MapFinder.getDefaultMapName(Map
Finder.java:57)
05/12/29 13:53:32 at bpel.p0.ExecLetBxExe1.execute(ExecLetBxExe1.java:62)
05/12/29 13:53:32 at com.collaxa.cube.engine.ext.wmp.BPELXExecWMP.__execut
eStatements(BPELXExecWMP.java:49)
05/12/29 13:53:32 at com.collaxa.cube.engine.ext.wmp.BPELActivityWMP.perfo
rm(BPELActivityWMP.java:185)
05/12/29 13:53:32 at com.collaxa.cube.engine.CubeEngine.performActivity(Cu
beEngine.java:3398)
05/12/29 13:53:32 at com.collaxa.cube.engine.CubeEngine.handleWorkItem(Cub
eEngine.java:1905)
05/12/29 13:53:32 at com.collaxa.cube.engine.dispatch.message.instance.Per
formMessageHandler.handleLocal(PerformMessageHandler.java:75)
05/12/29 13:53:32 at com.collaxa.cube.engine.dispatch.DispatchHelper.handl
eLocalMessage(DispatchHelper.java:100)
05/12/29 13:53:32 at com.collaxa.cube.engine.dispatch.DispatchHelper.sendM -
Date data from Crystal Report one day less than Date from Source
Hi,
I am creating a Crystal Report 4.0 for Enterprise Users (Client Version only) based on a BEx query. I have a field called 'Date' that I am bringing over from the BEx query. It has a format of MM/DD/YYYY. When I view the 'Date' in Crystal Reports, it is displaying as 1 day less from the actual data. For example, in the BEx Query, 'Date' = 11/01/2011. In Crystal Reports, it is showing up as 10/31/2011, which is one day behind. I'm not sure what's going on.
Please help!Well, this is as weird as it gets!
Here are the observations on SP02:
1) The Date Characteristic is a day off in the report while the 'Key' shows correct date
2) It displays in the '30.01.2011' (DD.MM.YYYY)format
3) When you right-click this field to change the date format, the date option is missing
4) You create a formula to see if this is a date and it returns True. The formula you can try is :
isdate(). It returns False for any other function like isnumeric() etc
5) So, this is a date filed, or CR4E thinks this is a date field, however doesn't let us change the format
6) You cannot use this field with date functions like cdate(); weird!
7) The only way you can show it the way you want is to write this formula:
*mid(,4,2)&"/"&left(,2)&"/"&Right(,4)*
This is still a string field, however displays as MM/DD/YYYY.
In Crystal Reports 2011, however, the following formula on the same date field returns a date value, meaning you can further right-click this formula field to change the date format like a normal date field:
cdate(tonumber(Right(,4)),tonumber(mid(,4,2)),tonumber(left(,2)))*
The same formula, however, throws a 'String is non-numeric error in CR4E and I found that it doesn't like this:
*tonumber(Right(,4)) ; same error
I've tried a lot of combinations to make this a date field in CR4E, however none works!
So, the only option is to use the formula that I mentioned above.
P.S: If you install Patch 2.10, you'll notice that the Characteristic value shows the correct date. For some reason though, it is in the same format as the 'Key' and if we wish to change the date format, the only possible workaround is to extract the numbers and join like I suggested above.
Hope this helps!
-Abhilash -
Financial Reports with Date measures are showing data one day less
Hello,
I am running a financial report off of an ASO cube with type measures enabled. However, when i run the report in FR, that date data coming out is 1 day less...for eg 04/30/2012 comes out as 04/29/2012.
however, when i run the same ad-hoc report via smart view, it is fine and the date comes out as expected. this is happening only in FR.
Any help in this regard will be much appreciated.
Thank you...I'm not sure what version you are running, but this was determined to be a bug that was fixed in 11.1.2.
Although not pretty, you can add a similarly named dynamic member that will advance your date for you that you could use in FRS. You could use the DateRoll function: DateRoll ([Date Dimension], DP_DAY, 1 ). Just an idea. -
BPM Java WebDynpro xsd:date decrease one day
Hi Experts.
I have a problem with the context between Java WebDynpro and BPM. I have an attribute of date type , when BPM call the Web Dynpro UI, this date it shows to user with one day minus, but in BPM Context and Web Dynpro context are with the correct date.
I checked the BPM context and the value of this attribute is: "2011-08-06Z".
I think that the problem is with the "Z" because it's like a time zone.
Any suggestions?
Thanks,
Julian.Hello Julian,
We faced the same issue as you, and after doing all checks in configuration, nothing!, finally we found a SAP note that recommends to change the date type to string types, but, we have a lot of webservices calls and mappings that requieres a "date" type and this make more dificult the "solution".
Then we found a little tricky solution.
We change the webdynpro Date types to Strings, and make the transformation in bpm mapping to cast as xsd:date, finally in webdynpro you must perform a string.format for the outgoing date as BPM is specting the date ( "YYYY-MM-DD")
With this solution you see a "date" type in BPM context and String type in Webdynpro and the offtset disappears.
This solution maybe is similar to SAP Note, but you don't need to change all your consumed webservices types.
Regards!
Julio Cesar Leyva -
Convert data values in columns to another value based on a math formula
ISSUE:
I have a database of emergency incidents with descriptive data and longitude and
latitude. I would like to make a google map out of the information but unfortunately
the X Y coordinates are projected in Florida State Plane West in feet. Google maps
requires WGS84 longitude and latitude in decimal degrees.
PROBLEM:
I have written some code in Transact SQL that will convert the values. But I am at a loss as to how to do the following:
1.) plug in the X Y values from my database using an sql SELECT statement.
2.) apply the formula to convert from State Plane to WGS84 to these X Y values
3.) output the results.
In other words, I have the data and I have the formula, but I am not figuring out how to plug the data into the formula and output the results. I am missing how to tie it all together.
CODE:
DECLARE @Easting DECIMAL(18,10);
--SET @Easting = CAST(I_MapX AS DECIMAL(18,10));
DECLARE @Northing DECIMAL(18,10);
--SET @Northing = CAST(I_MapY AS DECIMAL(18,10));
DECLARE @m2sft DECIMAL(10,10);
SET @m2sft = 1200.0/3937.0;
DECLARE @N0 DECIMAL(3,2);
SET @N0 = 0.0;
DECLARE @E0 DECIMAL(18,11);
SET @E0 = 656166.6666666665;
DECLARE @S0 DECIMAL(12,5);
SET @S0 = 2692050.5001/@m2sft;
DECLARE @K0 DECIMAL(18,18);
SET @K0 = 0.9999411764705882;
DECLARE @a DECIMAL(10,2);
SET @a = 6378137.0/@m2sft;
DECLARE @e DECIMAL(18,17);
SET @e = 0.0818191911198883;
DECLARE @ePrime DECIMAL(18,17);
SET @ePrime = 0.08208852110265381;
DECLARE @r DECIMAL(18,10);
SET @r = 6367449.14577/@m2sft;
DECLARE @V0 DECIMAL(15,12);
SET @V0 = 0.005022893948;
DECLARE @V2 DECIMAL(15,12);
SET @V2 = 0.000029370625;
DECLARE @V4 DECIMAL(15,12);
SET @V4 = 0.000000235059;
DECLARE @V6 DECIMAL(15,12);
SET @V6 = 0.000000002181;
DECLARE @L0 DECIMAL(4,2);
SET @L0 = 82.0;
DECLARE @w DECIMAL(18,10);
SET @w = (@Northing - @N0 + @S0)/(@k0*@r);
DECLARE @of DECIMAL(18,10);
SET @of = @w + (sin(@w)*cos(@w))*(@V0 + @V2*power(cos(@w),2) + @V4*power(cos(@w),4) + @V6*power(cos(@w),6));
DECLARE @Rf DECIMAL(18,10);
SET @Rf = @k0*@a/sqrt((1 - power(@e,2)*power(sin(@of),2)));
DECLARE @EPrime2 DECIMAL(18,10);
SET @EPrime2 = @Easting - @E0;
DECLARE @Q DECIMAL(18,10);
SET @Q = @EPrime2/@Rf;
DECLARE @tf DECIMAL(18,10);
SET @tf = tan(@of);
DECLARE @nf DECIMAL(18,10);
SET @nf = @ePrime*cos(@of);
DECLARE @B2 DECIMAL(18,10);
SET @B2 = -0.5 * @tf * (1 + POWER(@nf,2));
DECLARE @B4 DECIMAL(18,10);
SET @B4 = -1/12*(5 + 3 * POWER(@tf,2) +POWER(@nf,2) * (1-9 * POWER(@tf,2)) - 4 * POWER(@nf,4));
DECLARE @B6 DECIMAL(18,10);
SET @B6 = 1/360*(61 + 90*POWER(@tf,2) + 45*POWER(@tf,4) + POWER(@nf,2)*(46 - 252*POWER(@tf,2) - 90*POWER(@tf,4)));
DECLARE @Latitude DECIMAL(18,10);
SET @Latitude = (@of + @B2*POWER(@Q,2)*(1 + POWER(@Q,2)*(@B4 + @B6*POWER(@Q,2))))*180/(PI());
DECLARE @B3 DECIMAL(18,10);
SET @B3 = -1/6*(1 + 2*POWER(@tf,2) + POWER(@nf,2));
DECLARE @B5 DECIMAL(18,10);
SET @B5 = 1/120*(5 + 28*POWER(@tf,2) + 24*POWER(@tf,4) + POWER(@nf,2)*(6 + 8*POWER(@tf,2)));
DECLARE @B7 DECIMAL(18,10);
SET @B7 = -1/5040*(61 + 662*POWER(@tf,2) + 1320*POWER(@tf,4) + 720*POWER(@tf,6));
DECLARE @L DECIMAL(18,10);
SET @L = @Q*(1 + POWER(@Q,2)*(@B3 + POWER(@Q,2)*(@B5 + @B7*POWER(@Q,2))));
DECLARE @Longitude DECIMAL(18,10);
SET @Longitude = (@L0 - (@L/cos(@of))*180/(PI()))*-1;
SELECT
I_EventNumber
FROM Incident
WHERE I_tTimeDispatch > 'May 7, 2012'
SAMPLE DATA:
Here is some raw data in order to get you started. Please notice the MapX and MapY
coordinates are VARCHAR because they are Florida State Plane projections. The goal is
to take these and turn them into WGS84 longitude and latitude expressed as decimal
degrees to be used in Google maps. NOTE: I can convert from VARCHAR to DECIMAL. I just can't figure out where to plug my database columns into the sql query to output a result.
CREATE TABLE Incidents
I_EventNumber VARCHAR(20)
I_MapY VARCHAR(15)
I_MapX VARCHAR(15)
INSERT INTO Incident
VALUES
(FCW69, 0815312, 0672298)
, (FCW70, 0833311, 0697870)
, (FCW71, 0807747, 0699684)
, (FCW72, 0801252, 0689469)
, (FCW73, 0853491, 0692350)Here's a way to get the results, all as part of a single extensive query (this would probably be more suited for defining a VIEW, where you could join on the input table with the VIEW to incorporate the computed values.
If you instead had a business situation where you might need to execute this logic from many different places, rewriting as a user defined function might be better. Anyway, for the answer plus a demonstration of the power of CROSS APPLY to generate
interim working values...
Create_Sample_Data:
Declare @Incident TABLE
I_EventNumber VARCHAR(20), I_MapY VARCHAR(15), I_MapX VARCHAR(15)
INSERT INTO @Incident
VALUES
('FCW69', '0815312', '0672298')
, ('FCW70', '0833311', '0697870')
, ('FCW71', '0807747', '0699684')
, ('FCW72', '0801252', '0689469')
, ('FCW73', '0853491', '0692350') /* This insert is SQL 2008 syntax only.. do multiple inserts or a UNION for 2005 */
AsQuery:
Select *
from @INCIDENT
Cross Apply
Select
N0 = 0.0,
E0 = 656166.6666666665,
K0 = 0.9999411764705882,
e = 0.0818191911198883,
ePrime = 0.08208852110265381,
V0 = 0.005022893948,
V2 = 0.000029370625,
V4 = 0.000000235059,
V6 = 0.000000002181,
L0 = 82.0,
Easting = CAST(I_MapX AS DECIMAL(18,10)),
Northing = CAST(I_MapY AS DECIMAL(18,10))
) as CAStatic
Cross Apply
Select m2sft = 1200.0/3937.0,
EPrime2 = Easting - E0
) as CAComputed1
Cross Apply
Select S0 = 2692050.5001/m2sft,
r = 6367449.14577/m2sft,
a = 6378137.0/m2sft
) as CAComputed2
Cross Apply
Select
w = (Northing - N0 + S0)/(k0*r)
) as CAComputed4
Cross Apply
Select
[of] = w + (sin(w)*cos(w))*(V0 + V2*power(cos(w),2) + V4*power(cos(w),4) + V6*power(cos(w),6))
) as CAComputed5
Cross Apply
Select
Rf = k0*a/sqrt((1 - power(e,2)*power(sin([of]),2))),
tf = tan([of]),
nf = ePrime*cos([of])
) as CAComputed6
Cross Apply
Select
Q = EPrime2/Rf,
B2 = -0.5 * tf * (1 + POWER(nf,2)),
B4 = -1/12*(5 + 3 * POWER(tf,2) +POWER(nf,2) * (1-9 * POWER(tf,2)) - 4 * POWER(nf,4)),
B6 = 1/360*(61 + 90*POWER(tf,2) + 45*POWER(tf,4) + POWER(nf,2)*(46 - 252*POWER(tf,2) - 90*POWER(tf,4)))
) as CAComputed7
Cross Apply
Select
Latitude = ([of] + B2*POWER(Q,2)*(1 + POWER(Q,2)*(B4 + B6*POWER(Q,2))))*180/(PI()),
B3 = -1/6*(1 + 2*POWER(tf,2) + POWER(nf,2)),
B5 = 1/120*(5 + 28*POWER(tf,2) + 24*POWER(tf,4) + POWER(nf,2)*(6 + 8*POWER(tf,2))),
B7 = -1/5040*(61 + 662*POWER(tf,2) + 1320*POWER(tf,4) + 720*POWER(tf,6))
) as CAComputed8
Cross Apply
Select
L = Q*(1 + POWER(Q,2)*(B3 + POWER(Q,2)*(B5 + B7*POWER(Q,2))))
) as CAComputed9
Cross Apply
Select
Longitude = (L0 - (L/cos([of]))*180/(PI()))*-1
) as CAComputedLatLong
Notice that each subsequent CROSS APPLY depends on a "working value" column being defined in some previous cross apply, or the working query. There are a few other options, such as leaving off the very last Cross Apply, and computing Longitude as part
of the main query at the beginning, but it works either way.
EDIT: P.S. - By the way, this query is based on the formula in the original poster's query. My formula matches that formula, and I bet it's right (as far as the lat/long conversion), but it could be the formula for Soylent Green, and I wouldn't know any
better... :-) -
BBM on BB Classic eating up a lot of mobile data during one day and without reason
Hello, on August 1, BBM (10.9.5.22) on my Classic (software release 10.3.1.1779) suddenly consumed about 125 megabytes of data via mobile network within one day, without having used BBM for anything but a few text messages and with only one chat having been active. Maybe there were about two photos, but only in the default low resolution which are never above a few hundred kilobytes. Is anyone able to explain this behaviour? I'm a little bit frustrated as 125 megabytes are a lot if the free "high speed" volume per month is only several 100 megabytes, and BBM consumes a lot of it right of the beginning of a month And otherwise, e.g. for video calling, it asks if you really want to do that on a mobile network... Thanks for any idea and best regards, Hans-Juergen
The frustration continues... now BBM consumes at least (!) 40 megabytes per day, by only using it for a fwe text messages. However, I found an interesting knowledge base article saying that "BBM" within the device monitor might be related to other tasks using an "EBMService". http://btsc.webapps.blackberry.com/btsc/KB36954 Here are the most recent mobile data usage graphs - totals first: Then BBM details: As a comparison, the previous month. On July 18th I started using BBM, and it seems it already started eating mobile data there right away: Before I started using BBM, 500 megabytes per month were more than enough. Now it seems as if BBM alone will berak my current 1 GB limit far before the end of this month! By searching the forum, I found multiple similar issues, but none of them solved completely. Except for the parental control attempt, but as I want to use BBM, that is not appropriate for me. http://supportforums.blackberry.com/t5/BBM-for-BlackBerry/BBM-high-data-wi-fi-usage/m-p/3110624 http://supportforums.blackberry.com/t5/BBM-for-BlackBerry/Extreme-BBM-Data-usage-this-past-month/m-p/3104776 http://supportforums.blackberry.com/t5/BBM-for-BlackBerry/BBM-Data-usage-extremely-high/m-p/3098544 http://supportforums.blackberry.com/t5/BBM-for-BlackBerry/BBM-extreme-data-usage/m-p/3079395
-
Setting Date value in File Name while scheduling report to File System
I am trying to set the file name as %SI_Name% Current Date.extension in Destination section while scheduling a crystal report to File system.
So in Use Specific Name section i have added %SI_NAME% %SI_STARTTIME%.%EXT%.
Schedule works fine for me and I get the document in the file location with name 'Title 2009-06-26-12-53-17.pdf".
But I dont want time to be printed in the title, so the title should be "Title 2009-06-26.pdf". How i can achieve this.
-RaghuIs there any way to achieve this?
-Raghu
Edited by: Raghavendra Barekere on Jul 5, 2009 3:09 PM -
Problems with converting date in one calendar into another.
I am trying to convert, say, today's date into a Hebrew or Japanese calendar and put it into a form so it can be printed. I can convert date components but I can't get it so that I can use it with NSDateFormatter to print the date - it comes out as a Gregorian date even though printed from an NSDate object derived from a Hebrew calendar object.
Is there any sample code I can look at?I have a compaq 3900 which I sync with ical. I use PocketmacPro.
It is the smoothest sync give it a try.
Isync all my callendars, contacts, transfer word and excell docs.
There tech support is good to -
How to convert date-time according to the Time Zone the client
Urgent! Help wanted!
I extract a date-time field (which is GMT time) from the central database but I need to convert it accordding to the TimeZone of the user and also the so-called winter time and summer time in the local. Any one has any good solution?
Thanks.Use a Calendar, Timezone and Locale objects like this,
TimeZone tz = TimeZone.getTimeZone("Germany/Berlin");
Calendar cal = Calendar.getInstance(tz, Locale.GERMAN);
long date = 0; // assign your central database value to this variable
cal.setTime(new Date(date));
Now you can use the Calendar object 'cal' to retrieve the time according to the set locale and timezone.
These objects provide tonnes of features for finding out timezones and day light savings times. So check out the APIs as well.
I hope this helps you out. -
Shopping cart line items are missing while transfering from ITS to EBP
Hi everyone
I am Raghu, working on EBP (version 2.0)
Some shopping cart line items are missing while transferring the shopping cart data from ITS to EBP.
For example in my shooping cart 4 items are there,during transferring shopping cart data from ITS to EBP all 4 items are getting updated for all the shopping cart related tables except account assignment table.
In account assignment table for this particular shopping cart only 3 items are updated and usually the first line item gets missed out.Hence the the system fails to create the follow on documents in R/3.
This is happening randomly for few of the shopping carts that too most of the cases first item of the shopping cart was not updating reqacct table(this is account assignment table for shooping cart items).
I have debugged entire scenario,but couldn't find the cause for this..
Can any one please advise me....why this is happening?
Your immidiate ersponse will surely help me a lot.
Thanks,
RaghuHi Yann
Thanks for your support.
Yes, we are using EBP2.0/CRM 2.0C & the support pack level is SAPKU20C23.
Please advice
Thanks
Raghu -
My calendar is one day out when synced from iPhone to imac
I have an iPhone 5s. I have just bought an iMac 21.5inch.
When I connected my iPhone to the iMac to sync it, the calendar events all came over, but they are one day behind.
I am very new to iMac.
If anyone has a suggestion - I would really appreciate it.
ThanksHi ellie,
Welcome to the Support Communities! If your iPhone's calendar events are one day behind when synced to your iMac, check the date and time settings on both devices. Here's how:
iOS: Troubleshooting issues with date and time - Apple Support
http://support.apple.com/en-is/HT203483
Ensure that the version of iOS on your device is up to date.
If the option to enable date and time automatically is available, turn it on. Tap Settings > General > Date & Time.
Ensure that your time zone is set up correctly. Tap Settings > General > Date & Time > Time Zone.
If the incorrect date, time, or time zone is being set up automatically on the device, please notify your cellular provider. In the meantime, tap General > Date & Time and turn off Set Automatically. Then set the appropriate time and time zone manually.
Note: The option to set automatically might not be available on all carriers in all countries.
Learn more
Note: If you find that your device's time is incorrect after you sync with your computer, your computer's time may be incorrect. Verify the computer's time in System Preferences > Date & Time (you may want to select the checkbox to set the computer's date and time automatically).
Hope you are enjoying the holidays ...
- Judy
Maybe you are looking for
-
Hi! I tried to download Adobe Reader 9.3 from your website (www.adobe.com), it downloaded successfully, but when I tried to install it, I got this error: Do you know how I can install it so it will read this file? I am not computer-savvy so I don't w
-
FM which gives the date if we add 'x' number of days to the current date.
Hi all, can you plz tell me the FM which will give me the exact date if i add some ' X ' number of days to the present date. in detail -->my inputs would be 1)DATE 2)no of days i need--> the exact da
-
Hi , I need to create a csv file and load that csv file into database. But while creating csv i am facing problems with line seperators.After typing one line i am pressing "Enter Key" to terminate that line and go to next line.But that is not inserti
-
Sizing of still images for use in Premiere Pro editing.
I use Premiere Pro 5.5. I use format: AVCHD 1080i25(50i) Anamorphic for my editing (I have a Canon Legria Camera). My current stills are resized to 800x 600. When I insert in to the sequence and play it, they fall outside the safety margins. I read t
-
Blogging on IPad2: my background image is cut on one side?
Hi, As I was saying I am blogging (http://monoeil-ny.blogspot.com) and I realized that my background image is cut on the left side if I look into my blog from my Ipad2. Is it a problem of the background image size (1516 x 1238)? If so, what size woul