BI- Extract Hour:Min from date and get Avg
Hi there,
am working on BI answer and trying to get the average of the working hours of the departments. The Working Hrs column is Date format in the Database. And I managed with Forum help to Extract the Hours from this column and do the average through the BMM in the RPD on the Fact table as following:
EXTRACT( HOUR FROM "Ain_Access"."Fact_Access"."Working Hours")
Now on the BI Answer results I have 8 instead of 08:57.
But what I need is to Extract the Hour and the minuets and get their AVG.
Appreciate your help,
Averaging column with date/time format in BI Answer
this expression will work:
(60 * EXTRACT( HOUR FROM "Ain_Access"."Fact_Access"."AVG Working Hours" ) + EXTRACT( MINUTE FROM "Ain_Access"."Fact_Access"."AVG Working Hours" )) / 60
but only if this "AVG Working Hours" is DATE type.... and this look like strange name fore DATE? "AVG" is average, aren't?
Arent u need to use "Working Hours" instead of "AVG Working Hours" ?
like this:
(60 * EXTRACT( HOUR FROM "Ain_Access"."Fact_Access"."Working Hours" ) + EXTRACT( MINUTE FROM "Ain_Access"."Fact_Access"."Working Hours" )) / 60
all best
phenix
Similar Messages
-
What a have is a VI that uses the following SUbvi's, starts with FP OpenVI, then FP Create TagVI, into a "While Loop" which contains a FP ReadVI outputting data into a Index ArrayVI outputting to a Display (DBL). This shows the output of a FP-AI-100 monitoring a 9v battery. I have to monitor this battery for a 4 hour period my problem is storing the 4 hours of data and getting it out of the "while loop" into a "Write to Spreadsheet File VI" all I seem to accomplish is just one data sample which I get into a spreed ship file with no problem. I just can't get 4 hours worth. By the way this is my first VI and I'm self
trained so have mercy.I figured it out thanks.
John Morris
Glendinning Marine -
What a have is a VI that uses the following SUbvi's, starts with FP OPENvi, then FP Create Tagvi, into a "While Loop" which contains a FP READvi outputting data into a INDEX ARRAYvi outputting to a Display (DBL). This shows the output of a FP-AI-100 monitoring a 9v battery. I have to monitor this battery for a 4 hour period my problem is storing the 4 hours of data and getting it out of the "while loop" into a "Write to Spreadsheet File vi" all I seem to accomplish is just one data sample which I get into a spreed ship file with no problem. I just can't get 4 hours worth. By the way this is my first VI and I'm sel
f trained so have mercy.I figured it out Thanks.
John Morris
Glendinning Marine -
Get number of hours between two dates and two hours using factory calendar
Hello all,
I have the following requirement: I need to calculate the number of hours between two dates and two hours (start date- finish date and start hour-finish hour) or timestamps using a factory calendar. I must program it on CRM environment.
Does anybody know a function module that makes it?
Thanks in advance.
CarmenPlease check function module DURATION_DETERMINE.
- April King -
Error in running Extract Definition Upload from Data File concurrent.
Hi all,
Am trying to upload the 834 Extract Layout from the data file by running the concurrent program, Extract Definition Upload from Data File.
After running this concurrent program am getting the Extract Layout definition with Record layout and Data elements within it.
But some record layouts has the changes at their repeating level in that.
Please suggest me how do i get the same repeating levels for the record layouts when i move the 834 benefit extract layout definition
from one instance to another instance.Hi,
We have exactly the same error in IBolt. This error happens sometime and we don't find the reason.
IBolt has been upgraded to Version 3.1 SP1 and a fix has been developed by the support. After installation, we've work hardly during 2 days for testing all the flows by the customer without having this error.
Ibolt works as a service and when this error occurs, the service stopped and must be restarted.
In our flows, we have put a delete of the observer.dll file just before the rest of the flow but it doesn't solve the problem.
Deleting the directory can be temporarly a solution but the error come back another day.
Each time the SBO client or DTW is started, the %temp%\SMS_OBJ_DLL directory is created...
When you just delete the observer.dll file and leave the rest of the directory like it is, the file is re-created when you start and log to SBO. I would say that this file is a copy of another file observer_800178.dll (800178 depending of the version of SBO yoi have). 800178 corresponds to SBO 2007 A PL 42.
Do you have more information since your post has been send ?
Thanks in advance for your help.
Best regards. -
From date and to date in report
Hello,
I am working in Objective Setting and Assessments , I am using Infoset 0PAH_IS01, I have added 0PAH_DS01 in that.
In Reports I have created Variable for VALID FROM DATE and VALID TO DATE (BEGDA &ENDDA) form appraisal Document ID
In that selection screen first start date is coming after that end date is coming, I want to show it in paralled like
Appraisal stat date to appraisal End date.
I tried with replacement path, but not able to get, if i have to write customer exit, wt i have to do and what will be that coading.
Pl. suggest.
Thanks
Edited by: shalini on Nov 25, 2009 7:00 AMThis can be psooblie but you need to write user exit for the same while calculation .
1) Create variable of type interval on time characterisitcs (e.g.0calmonth).
2) Now if your from and to values are coming from diffenrent time charactersitcs then you need to pass the i/p values to those time characterisitcs .
Regards,
Aparna -
How describe model data and get select in DB throw topLink.
Hello,
I have table from code
create table t_tree
id int primary key,
parent_id int,
value varchar2(255)
Alter table t_tree
add constraint constr_id_parent foreign key (parent_id) references t_tree (id)
I must get query
select level as lv,lpad('-@-', (level-1)*2)||value as MMM, t.* from t_tree t
connect by prior id=parent_id
start with T.PARENT_ID is null
How describe model data and get select in DB throw topLink.
Dema.So you'll probably have to write a function which uses dynamic SQL to retrieve the desired message text, like this untested one:
CREATE OR REPLACE FUNCTION get_msg(p_db IN VARCHAR2,
p_id IN NUMBER)
RETURN VARCHAR2
IS
msg_txt VARCHAR2(4000);
BEGIN
-- make sure p_db is a valid database link ...
EXECUTE IMMEDIATE 'SELECT d_msg FROM msg@' || p_db || ' WHERE t_id = :id' INTO msg_txt USING p_id;
RETURN msg_txt;
EXCEPTION
WHEN NO_DATA_FOUND THEN
RETURN NULL;
END get_msg;
/The you can update likeUPDATE mex
SET t_msg = get_msg(db_id, t_id);Hth, Urs -
Substacting two dates and get result in months
Hi Friends
I have to subtract two dates and get the difference in months. Here's the sample data:
select DATE '2009-10-01' Date_value, 111 Cust_id, DATE '2009-10-22' Open_date from dual
union all
select DATE '2009-10-01', 112 , DATE '2009-10-15' from dual
union all
select DATE '2009-10-01', 113 , DATE '2009-10-5' from dual
union all
select DATE '2009-11-01', 111 , DATE '2009-10-22' from dual
union all
select DATE '2009-11-01', 112 ,DATE '2009-10-15' from dual
union all
select DATE '2009-11-01', 113 ,DATE '2009-10-22' from dualAnd here’s my query to get the difference in month:
SELECT cust_id, date_value, open_date,
ROUND (ABS (date_value - open_date) / 365 * 12) diff_in_months
FROM tBut the output is unexpected:
CUST_ID DATE_VALUE OPEN_DATE DIFF_IN_MONTHS
111 1/10/2009 22/10/2009 1
112 1/10/2009 15/10/2009 0
113 1/10/2009 5/10/2009 0
111 1/11/2009 22/10/2009 0
112 1/11/2009 15/10/2009 1
113 1/11/2009 22/10/2009 0Ideally, the output should be as per the following:
CUST_ID DATE_VALUE OPEN_DATE DIFF_IN_MONTHS
111 1/10/2009 22/10/2009 0
112 1/10/2009 15/10/2009 0
113 1/10/2009 5/10/2009 0
111 1/11/2009 22/10/2009 1
112 1/11/2009 15/10/2009 1
113 1/11/2009 22/10/2009 1What is wrong in my query?Hi Centinul
Found the resolution. When I use the following query, I get the perfect result:
SELECT cust_id, date_value, open_date,
ROUND (ABS (MONTHS_BETWEEN (open_date, date_value))) months,
ROUND (ABS (date_value - open_date) / 365 * 12) diff_in_months,
MONTHS_BETWEEN (date_value,ADD_MONTHS (LAST_DAY (open_date), -1) + 1 ) final_val
FROM tAnd here's the output of all three columns:
CUST_ID DATE_VALUE OPEN_DATE MONTHS DIFF_IN_MONTHS FINAL_VAL
111 1/10/2009 22/10/2009 1 1 0
112 1/10/2009 15/10/2009 0 0 0
113 1/10/2009 5/10/2009 0 0 0
111 1/11/2009 22/10/2009 0 0 1
112 1/11/2009 15/10/2009 1 1 1
113 1/11/2009 22/10/2009 0 0 1 -
Changing From date and To date for an Event in iMovie
I have digitized old home movies [16mm and 8mm] and then imported them into iMovie. These movies are from the 1940s through 1990s. I want to change the dates of From and To, but cannot. I am able to go into the routine, but it won't let me change the From date and won't accept the To date as, e.g. 1948 [which is understandable since it would read 2009 to 1948].
Is there a way to change the From date?
LarryThe From date is the date of the first clip in the event. The To date is the date of the last clip in the event.
You can change the date of the individual clips by Right/Click/Adjust Date.
You can also set the date of a clip be renaming it in the following format:
clip-yyyy-mm-dd hh;mm;ss.ext where hh is hours in 24 hour clock format and ext is the existing extension (e.g. MOV, DV, m4v, etc.) -
Personal Hotspot switches from LTE and gets stuck in 3G. Won't switch back
Hi There,
My Personal Hotspot on my iPhone 6 switches from LTE and gets stuck in 3G service. The hotspot stays in the 3G service even when I'm back in an LTE zone. The only reason I know I'm back in an LTE service zone is because if I disable hotspot, put my phone in airplane mode, and turn it back on I get LTE service. Please note that if I wasnt using personal hotspot the phone seems to find LTE, go to 3G, and then back to LTE just fine.
This happens while I'm commuting to work on the train and consistently pass between multiple cell phone towers.
Any help?
Thanks!!!JeffinSF wrote:
To recreate this...First make sure WiFi is off and that you have 3G turned on (go to Settings-->General-->Network) and that you're in a real 3G area (you'll see a "3G" symbol in the upper left of the screen
Then turn off 3G (go to Settings-->General-->Network and turn off 3G.) Wait a few seconds for the phone to switch to EDGE (you'll see the "E" indicator in the upper left of the iPhone screen once it's on EDGE). Then simply go back and turn 3G back on in Settings->General->Network. The phone SHOULD automatically reselect 3G and you'd see the "3G" again in the upper left part of the screen but instead you'll just see the same "E" in the upper left because it's not switching. To force the switchback to 3G after performing the above example, turn on Airplane mode and then turn it back off after a few seconds. For me, this always resets the radios such that 3G will again appear in the upper left of the screen and the phone will run on 3G. Otherwise it will just sit on EDGE even though I've turned 3G on. Strange but consistent.
I just tried this and my IP4 switched to 3G after turning back on the 3G and accessing a web site. It took about 5 seconds, but it did switch on its own. It did not happen just sitting there, I had to make it do some work (by loading data). -
I have changed my Apple ID from an old email to a new one. But It keeps coming up with my old email and asking for my old password. How do i stop this from happening and get it onto my new one? Its on my Ipad and iphone 5, please help as its doing my head it
How do you update it? Basically what has happened my password was disabled for "security reasons" on sunday (21/10/12), so i tried to reset it, but for some reason i couldnt get into my old email (probably because i havent used it for 2 years), so i read on here i could swap it to a new email that i currently use (which is what i have done) ive swapped everythin over to it (facetime, iCloud etc) but keeps coming up with old email and asking for password
-
i buy a mac mini from amazon, and it is registered on another Apple ID, and i need to change it to mine, how can i do that, note that i can't contact the previous owner of this mac, what shall i do to set it under my Apple ID.
ThanksAs I said you need to:
You need to wipe the hard disk and reinstall the OS by booting into the recovery partition and reinstall the original OS via the internet. It will ask you to enter your ID
OS X: About OS X Recovery
Also see:
OS X Mountain Lion: Erase and reinstall OS X -
Can you delete an item from itunes and get your money back???
hi!!! can u please tell me if you can delete an item from itunes and get your money back???
Thanks XDYou can certainly delete it, but you won't get your money back.
Stedman -
I have not synced my iphone to my new computer. My old computer is dead. How do I keep the music from disappearing and get synced to the new computer?
This will cost you http://www.wideanglesoftware.com/touchcopy/index.php
or see this doc http://discussions.apple.com/docs/DOC-3141 -
Create a record based on From date and To Date in CRM 2015 Plugins
Hi all
in my account screen i have two date field from date and Todate and i have one child entity member when i am creating a
new account then based on from date and to date number of child record should be created
for example in account screen
if from date=2/1/2015 and
To date=31/03/2015
then number of child record should be created
in this manner
from date to date
2/1/2015 31/01/2015
01/02/2015 28/02/2015
1/03/2015 31/03/2015Hi,
OK. It seems you want to create 3 records (custom child entity) where the first has the same From Date as the Account and goes up to the end of the month, and the other records go from there.
This logic can be implemented via a Plugin that could run on the create and update of these fields on Accounts. From the Plugin, you can set up the logic and fill the records with the necessary information.
Maybe you are looking for
-
Clean hard drive before selling; how do i get mountain lion on a disk for re-install?
Hope to resell old macbook pro and wish to clean hard drive. Need a CD of OSX to reinstall after cleaning. How do I get mountain lion on a CD?
-
How do I get rid of a virus on my MacBook Pro?
So I have had my MacBook Pro for about 4 years now and I just recently gotten a virus. I get a lot of pop up ads on sites (Sponsored by Vidx). I use Safari the most, if that has anything to do with it. However I do have Google Chrome installed as wel
-
PC died. Need to put contents of ipod on new PC
I had a PC laptop that my ipod classic was synced to. That laptop died and is not available.My ipod classic is fine but i need to transfer all its content to another PC so I can sync new content, (not purchased through itunes). Normally I transfer ed
-
I have posted an old topic but now i understand my error. Please people!!!! I think it is very simple, but i am not getting results at updating images in ScrollingImagePanels. My ScrollingImagePanel in a JInternalFrame, and the JInternalFrame is in a
-
BPC 7NW Installation ***Masters in BPC***
Hi, Im trying to install BPC 7NW. I´m using this document u201CInstallation Guide SAP Business Planning and Consolidation 7.0u201D But in page 11 ask me for a downloading in this path: https://websmp204.sap-ag.de/swdc/ SAP Installation & upgrades > E