Hi, i want to find the difference in days of two students Date Of Birth
hi, i want to find the difference in days of two students Date Of Births
how can i find.
please help me
i didn't find what u saidLet me help you:
http://onesearch.sun.com/search/onesearch/index.jsp?qt=difference+between+dates&subCat=siteforumid%3Ajava54&site=dev&dftab=siteforumid%3Ajava54&chooseCat=javaall&col=developer-forums
Similar Messages
-
I want to find the difference(duration) between logon and logoff time?
i want to find the difference(duration) between logon and logoff time of below table?
can any one tell the query to find using self join?
USR LOGON_TIME LOGOFF_TIME
HR 31-AUG-04 03.04.04.000000 AM -
HR - 31-AUG-04 03.04.14.000000 AM
Edited by: 794244 on Nov 1, 2010 10:47 PMNo selfjoin, just analytical functions.
CREATE TABLe log_time
(username varchar(20),
LOGON_TIME timestamp,
LOGOFF_TIME timestamp);
insert into log_time (username,LOGON_TIME,LOGOFF_TIME) values ('HR',sysdate,null);
insert into log_time (username,LOGON_TIME,LOGOFF_TIME) values ('HR',null,sysdate+1/38);
insert into log_time (username,LOGON_TIME,LOGOFF_TIME) values ('HR',sysdate+2,null);
insert into log_time (username,LOGON_TIME,LOGOFF_TIME) values ('HR',null,sysdate+2+14/20);
commit;
SELECT username,logon_time,logoff_time, my_logoff_time, my_logoff_time -logon_time,
time_to_sort
FROM (
SELECT username,logon_time, logoff_time,
LEAD(logoff_time,1,logon_time) OVER (PARTITION BY username ORDER BY time_to_sort) my_logoff_time,
time_to_sort
FROM (SELECT username,logon_time,logoff_time,NVL(logon_time,logoff_time) time_to_sort
FROM log_time)
where LOGON_TIME is not null
ORDER BY time_to_sort;
USERNAME LOGON_TIME LOGOFF_TIME MY_LOGOFF_TIME MY_LOGOFF_TIME-LOGON_TIME TIME_TO_SORT
HR 02.11.10 11:34:56.000000000 02.11.10 12:12:50.000000000 0 0:37:54.0 02.11.10 11:34:56.000000000
HR 04.11.10 11:34:56.000000000 05.11.10 04:22:56.000000000 0 16:48:0.0 04.11.10 11:34:56.000000000But, if that code which fills that table should better UPDATE than INSERT. You can cover much more issues. (e.g the DB crashes and you get 2 logon but no logoff in a sequence and.....)
-- andy -
I want to know the difference between Days column and Day1 Column
Hi All,
I used this query:
SELECT to_char(return_date_time,'dd/mon/yyyy hh24:mi:ss') Test,
DECODE ('I', 'I', DECODE (1, NULL, NULL, 0, NULL, SYSDATE + 1)) Days,
DECODE ('I', 'I', SYSDATE + 1) Day1
FROM fm_curr_locn
WHERE patient_id = 'DU00002765'
output:
Test
Days
Day1
26/oct/2013 00:00:00
26-OCT-13
10/26/2013 3:06:59 PM
I want to know the difference between Days column and Day1 column and why the days column didnt show the time
Please anyone help.....
Regards
Shagar MPleiadian wrote:
It is the decode statement that is doing this.
The format of decode is:
decode(expression, search1, result1, search2, result2, searchn, resultn, default)
All result fields must be of the same datatype and will be of the datatype of the first result (result1 in this example)
In your example (the decode for the field Days) the first result is a NULL. I suspect (gurus? anyone?) that Oracle will use the varchar2 overload of the decode statement, and the date field will be converted to varchar2 using your NLS_DATE_FORMAT settings.
In the second decode statment (Day1) the first result is of datatype date, so the result of the decode statement will be a date field (and will be parsed as such by your sql development tool)
I agree, as NULL is the first result returned the datatype is undetermined, so Oracle is picking VARCHAR2 over others, and causing an implicit datatype conversion on the resultant date value, whereas the other which is returned as a date will use the local settings of the client tool being used.
I can replicate the 'issue' in Toad, and it's rectified if we cast the first returned value of the decode statement...
SELECT DECODE ('I', 'I', DECODE (1, NULL, CAST(NULL AS DATE), 0, NULL, SYSDATE + 1)) Days,
DECODE ('I', 'I', SYSDATE + 1) Day1
FROM dual -
Find the difference between two dates for the specific month and year
Hi,
I have two dates, start date is 30/12/2012 and end date is 04/01/2013. Using datediff I found the difference of days between two dates. But I find the no of days in January 2013. ie output is 4 instead of 6. I input month and year to find the no of days
for that date. In this case I input Jan 2013. How can I sql this ?I don't understand how most of the answers provided here not analytically solving the problem with many cases possible.
First let me understand you:
You have 2 dates range and you want to calculate day range for specific month and year between the original date range.
declare @for_month int = 1 --January
declare @for_year int = 2013
declare @StartDate date = '2012-12-20'
declare @EndDate date = '2013-01-04'
SELECT
CASE
WHEN (DATEPART(MONTH, @StartDate) = @for_month and DATEPART(MONTH, @EndDate) = @for_month) and ((DATEPART(YEAR, @StartDate) = @for_year or DATEPART(YEAR, @EndDate) = @for_year)) THEN
DATEDIFF(DAY, @StartDate,@EndDate)
WHEN (@StartDate < cast(CONVERT(varchar(4), @for_year) + '-' + CONVERT(varchar(2), @for_month) + '-01' as date)) and (@EndDate between (cast(CONVERT(varchar(4), @for_year) + '-' + CONVERT(varchar(2), @for_month) + '-01' as date)) and (cast(DATEADD(d, -1, DATEADD(m, DATEDIFF(m, 0, cast( CONVERT(varchar(4), @for_year) + '-' + CONVERT(varchar(2), @for_month) + '-01' as date)) + 1, 0)) as date))) THEN
DATEDIFF(DAY, DATEADD(MONTH, DATEDIFF(MONTH, -1, @EndDate)-1, 0),@EndDate)
WHEN (@EndDate > cast(DATEADD(d, -1, DATEADD(m, DATEDIFF(m, 0, cast( CONVERT(varchar(4), @for_year) + '-' + CONVERT(varchar(2), @for_month) + '-01' as date)) + 1, 0)) as date)) and (@StartDate between (cast(CONVERT(varchar(4), @for_year) + '-' + CONVERT(varchar(2), @for_month) + '-01' as date)) and (cast(DATEADD(d, -1, DATEADD(m, DATEDIFF(m, 0, cast( CONVERT(varchar(4), @for_year) + '-' + CONVERT(varchar(2), @for_month) + '-01' as date)) + 1, 0)) as date))) THEN
DATEDIFF(DAY, @StartDate,DATEADD(d, -1, DATEADD(m, DATEDIFF(m, 0, @StartDate) + 1, 0))) + 1
WHEN ((DATEDIFF(DAY, @StartDate, cast(DATEADD(d, -1, DATEADD(m, DATEDIFF(m, 0, cast( CONVERT(varchar(4), @for_year) + '-' + CONVERT(varchar(2), @for_month) + '-01' as date)) + 1, 0)) as date)) >= 0) and (DATEDIFF(DAY, cast(CONVERT(varchar(4), @for_year) + '-' + CONVERT(varchar(2), @for_month) + '-01' as date), @EndDate) >= 0)) THEN
DATEDIFF(DAY, cast( CONVERT(varchar(4), @for_year) + '-' + CONVERT(varchar(2), @for_month) + '-01' as datetime), DATEADD(d, -1, DATEADD(m, DATEDIFF(m, 0, cast( CONVERT(varchar(4), @for_year) + '-' + CONVERT(varchar(2), @for_month) + '-01' as datetime)) + 1, 0))) + 1
ELSE
0
END as [DD]
I don't know how you calculate day range between 01/01/2013 and 04/01/2013
is 4, it is actually is 3 but if that is the case, you can add 1 from the condition. -
Calculate Difference in Days Between two Dates
Hi,
I'm trying to figure out how to calculate the difference in days between two dates using JavaScript in LiveCycle. (JavaScript knowledge = minimal)
Where "Start_Date" and "Current_Date" are the names of the two dates in the Hierarchy palette. (both Date/Time Field)
*Current date is using the Object > Value > Runtime Property > Current Date/Time
I need a Text or Numeric field displaying the difference in days. (Difference_in_Days)
I've noticed the following code being pretty standard amongst other responses:
var
Start_Date = new Date(Start_Date);
var
Current_Date = new Date(Current_Date);
var
nAgeMilliseconds = Current_Date.getTime() - Start_Date.getTime();
var
nMilliSecondsPerYear = 365 * 24 * 60 * 60 * 1000;
I know there's code missing, and the above code might not be correct.
Please advise.Where "DateField01" = user entered date field
Where "DateFiled02" = Current Date/Time (Runtime Property)
where "Subform" = the subform containing DateField01
My script now resembles:
var oneDay = 24*60*60*1000;
var firstDate = new Date(Subform.DateField01.rawValue);
var secondDate = new Date(DateField02.rawValue);
(firstDate.getTime() - secondDate.getTime()) / oneDay;
I tried adding:
app.alert(String(diffDays));
Although I assume the reason I didn't get an error is because DateField01 is empty when the form is opened.
If I swap in actual dates instead of fields it works perfectly.
When I use the fields I have no information populating after I enter a date in "DateField01" -
I have an issue installing photoshop CC trial, I currently have elements and wanted to see the differences before buying, when installing through the creative cloud app I get the error message Exit Code: 7 Please see specific errors below for troubleshooting. For example, ERROR: DW041 ... -------------------------------------- Summary -------------------------------------- - 0 fatal error(s), 1 error(s)
ERROR: DW041: INSTALLDIR Volume D:\ doesn't exist. ------------------------------------------------------------------------------------- System Requirements and it will not install, It says cant find the path D: im not sure why because as far as I can see its set to install on drive C: which is where I want it!Exit Code: 6, Exit Code: 7 Installation Errors - http://helpx.adobe.com/creative-suite/kb/errors-exit-code-6-exit.html
Troubleshoot with install logs | CS5, CS5.5, CS6 - http://helpx.adobe.com/creative-suite/kb/troubleshoot-install-logs-cs5-cs5.html for information on how to review your installation logs -
How to compare two excel reports and find the difference in BI Publisher
Hi All,
I have a requirement that needs to compare two excel reports in XML Publisher 5.6.2. or BI publisher 10.1.3.4
If anybody has an idea about this pls help us.
Thanks,Since our customer wants to have this comparison only with BI reports....here is the scenario how the comparison should be..
Now,we have a parameters called Customer name and version id. Version id list will be refreshed based on the customer selection.
User can generate the report based on the selected customer name and version id. These data are fetch from the oracle database and we are using Data Template in the BI Publisher.
Now the requirement is customer wants to compare two version id data. for example, v1.2 and v1.3
Now they wanna to see both the reports while generating in the same work sheet, like, v1.2report should display in the left side and the v1.3report has to display in the right hand side of the same work sheet.
Now...If there is any addition happened in v1.3 report,then that cell/data should display as a green color in that report.
If any deletion happened in v1.3report then that should be in the red color.
If any modification happened in v1.3 then that should be in the yellow color.
If there is no difference then that should display as it is.
the thing is that, the both the reports (v1.2 and v1.3)should display side by side in the same worksheet with the format and everything........only the difference should be highlighted.
Template is same for both the reports..
To display the data for both versions i think i can generate the template side by side of both in the same worksheet.
Now, My question is how to find the difference of data in the RTF Template for both the versions
Can anybody assist me?
Thanks,
Edited by: user753355 on Jun 9, 2009 12:03 AM
Edited by: user753355 on Jun 9, 2009 12:06 AM
Edited by: user753355 on Jun 9, 2009 12:16 AM
Edited by: user753355 on Jun 10, 2009 3:59 AM -
Find the difference between two columns in an ssrs matrix ? MSCRM
Hi All,
I am working in reporting part of our project (On-line MSCRM 2013) & in reporting services.
I am trying to create report using fetch xml based. Below is the snap what we required the result.
Kindly help me, how to get the difference in both column. (Its a matrix table where year is grouped).
We need difference between both year Like (Plan Revenue of 2013 & Plan Revenue of 2014 difference in Plan Revenue Diff section) and same for Actual
Revenue.
https://social.microsoft.com/Forums/en-US/054d5ca4-0d38-4dc6-84a8-88866cc228fe/find-the-difference-between-two-columns-in-an-ssrs-matrix-mscrm?forum=crmdevelopment
Thanks,
Mohammad ShariqueHi Bro,
I used parametrized option for year and done the report,Currently we are getting values in Difference column now i want to show
that value in percentage. How can we show the percentage based on that value. Means i want to show the Difference in Percentage.
Kindly help me i tried but getting some issue. Below i am mentioning the code and snap with result.
Below expression using to showing Plan Revenue in Percentage for year.
=
Sum(IIF(Fields!new_year.Value =Parameters!StartYear.Value,cdec(Fields!new_planrevenueValue.Value/1000), cdec(0)))
- Sum(IIF(Fields!new_year.Value =Parameters!EndYear.Value,cdec(Fields!new_planrevenueValue.Value/1000), cdec(0)))
/IIF(Sum(IIF(Fields!new_year.Value = Parameters!StartYear.Value,cdec(Fields!new_planrevenueValue.Value/1000), cdec(0)))>0,
(Sum(IIF(Fields!new_year.Value = Parameters!StartYear.Value,cdec(Fields!new_planrevenueValue.Value/1000), cdec(0))))
,1)
)*100))
Result issue is as below in snap with highlighted in red colour.
Kindly help me on this issue also :) -
How to find the difference of two columns in deski
Hi Everyone,
I have a deski report which is build from a single query. The report contains two tables.
Table-1:MTK Loc
MTKnet
Table-2:WTK Loc
WTKnet
Now i need to find the difference of the columns WTKnet and MTKnet.
These two are report level variables.Their definitins are as below:
MTKnet:=Sum((<Fees Collected by Per Collected>) In Body) ForEach <vMTKLocation>
WTKnet:=Sum((<Fees Collected by Per Collected>) In Body) ForEach <vWTKLocation>
Where <Fees Collected by Per Collected> is universe variable.
Please help...
Thanks in Advance......Hi Bol,
As I understand you are taking MTK_Loc and WTK_Loc together in the report which have common values under Fees Collected by Per Collected column.
Please follow the steps mentioned below:
1. Calculate the Variables MTK_Net as
=Sum(<Fees>) IN <MTK_Loc>
2. Calculate the Variables WTK_Net as
=Sum(<Fees>) IN <WTK_Loc>
3. You will get the values based on the Locations MTK_Loc and WTK_Loc .
You are using combination of values for MTK_Loc and WTK_Loc hence you will get the variable values in combination.
Insert new column right to the WTK_Net and write the formula name it Variance.
=<MTK_Net>- <WTK_Net>
The values look like :
MTK_Loc WTK_Loc MTK_Net WTK_Net Variance
Chicago Chicago 16,696,274.43 157,168.26 16,539,106.17
Chicago Madison 16,696,274.43 274,396.12 16,421,878.31
Chicago Milvaki 16,696,274.43 16,622,870.97 73,403.46
Chicago Pennsylvania 16,696,274.43 4,299.35 16,691,975.08
Chicago Waukesha 16,696,274.43 22,067.08 16,674,207.35
Here you will see values for MTK_Net are repeated because these are based on the MTK_Loc which is same for all rows i.e. Chicago , same is the case with remaining values of MTK_Loc.
We can not calculate variabnce based on the values like Canada,Pennsylvania for all values as these values come in combination of each other and as these are all connected columns WEBI groups Measure data based on the Dimension and variable columns associated with it.
MTK_Loc WTK_Loc MTK_Net WTK_Net Variance.
Chicago Chicago 16696274.43 157168.26 16539106.17
However you can compare the values based on the values as :
1. Drag and Drop MTK_Loc and MTK_Loc separately on the report.
2. Drag and Drop WTK_Loc and WTK_Loc separately and put it on the report, Connect it to the columns MTK_Loc and MTK_Loc columns already dragged. Then you can compare the values
MTK_Loc MTK_Net WTK_LOC WTK_Net
Chicago 16,696,274.43 Chicago 157,168.26
Madison 315,705.91 Madison 274,396.12
Manitowoc 362,632.50 Manitowoc 359,978.50
Milvaki 54,172.84 Milvaki 16,622,870.97
Pennsylvania 2,966.56 Pennsylvania 4,299.35
Waukesha 9,028.03 Waukesha 22,067.08
Here I unchecked the option avoid duplicate row aggregation (select table-> format table) thatu2019s why it is showing all values as a sum of all MTK_Net and WTK_Net values corresponding to Location values..
Here we are using MTK_Loc and WTK_Loc separately and not connected because though values seems same but they are used in combination ( Chicago, Pennsylvania) in 2 separate tables in DB hence we canu2019t synchronize them by liking these 2 location columns using 2 data providers.
I Hope this is what you want....
Thanks....
Pratik -
Find the difference in Two Tabels in two different schema?
Hello Gurus,
In DB which have millions of records -
I have a Tabel A under Schema A and i have another Tabel B under Schema B and i have to pick the refrence from Tabel C under Schedma B altough my DB is same. Both of the tables (Table A and Table B) have exatly the same structure in both the schema and when i tried finding the difference like -
Find the refrence from Table C and pick the values which are in Tabel A under Schema A but which are not present in the Tabel B under Schema B .
I have to compare each and ever field value which is present under all of the columns under Table A to ever field value which is present under all of the columns under Table B.
then wrote the following query-
SELECT * FROM
SchemaA.Table A t1,SchemaB.Table C t2
WHERE t1.SV_ID = t2.SV_ID order by t1.SV_ID
Minus
Select * from SchemaB.TableB order by SV_ID
Then this query is not working. And display the following error -
"query block has incorrect number of result columns"
Even both of the tables have the same column's and same structure.
Kindly help me .
Looking forward for some guidance -
Thanks in advance.1-There are some 70 Columns in both of the tables so thats why i don't want to use the query based on columns as it will involve writing all of the columns.
2- By using the query something like -
select <column_name(s)> from table1
minus
select <column_name(s)> from table2, table1
where <condition>
It is throwing the error -ORA-01789: query block has incorrect number of result columns
3- Using the query
SELECT t1.*
FROM SchemaA.TableA t1,SchemaB.TableC t2
WHERE t1.SV_ID = t2.SV_ID
MINUS
SELECT t3.*
FROM SchemaB.TableB t3
order by SV_ID
It gives me the reuslt but when i corss check them individually in both of the tables then there is no difference.
4- SELECT t1.* FROM
SchemaA.Table A t1,SchemaB.Table C t2
WHERE t1.SV_ID = t2.SV_ID order by t1.SV_ID
Minus
Select * from SchemaB.TableB order by SV_ID
Query is not working.
Kindly help me to find the difference between two tables , column by column based on the condition both of the tables have the same SV_ID. -
How to find the difference of 2 fields in template?
Hi,
I am building an rtf template, I have two fields in the template which come from XML extract.
I need to add one more column to the template which is the differecnce of the 2 columns (column1-column2).
I don't have this column in the XML extract, I need to calculate this in the template.
I am quiet new to using XML Publisher.
Could somebody please tell me, how can I achieve this?
Thanks in Advance,
ThiruHi,
I am able to find the difference by <?(column1tag)-(column2tag)?>.
But now I want to have the sum of this field at different levels
<?sum((column1tag)-(column2tag))?> is not working giving some error.
Could somebody please help me out, how can I achieve sum for this?
Thanks in Advance,
Thiru -
I want to know the difference between iphoto master folder and previews folder
I want to know the difference between iphoto library master folder and previews folder.. my pictures is stored in master but part of them is also copied into previews.. it occupied too much space.. if I can't change anything in iphoto library, any way to save the space for iphoto? 70G for almost 15,000 pictures, is it reasonable?
i use mac book pro, ilife 11..70GB for 15,000 photos is reasonable, yes, if the photo files are large.
DO NOT meddle with the contents of your iPhoto Library in any other way than using the commands available in the iPhoto application. What appear to be duplicate files stored in different parts of the library are NOT duplicates, and if you attempt to save space by deleting things in the Finder, you will wreck your library and land in a world of trouble. -
Find the same day in a range then find the difference between the days
Need assistnace with the following .
I have a table of ids for courses and each course class is on a day. I have to take the first day the course class is on and find the next same day then work out the difference in days.
eg. a course class is on a saturday then have to go thru the course class associated to a course and find the next saturday then work out the difference.
Anyone able to help - it would be much appreciatedcourse class id date day
abcdefa 18/12/2002 wednesday
abcdefb 19/12/2002 thursday
abcdefc 20/12/2002 friday
zxvyza 17/12/2002 monday
zxvyzb 20/12/2002 thursday
zxvyzc 21/12/2002 friday
zxvyzd 24/12/2002 monday
zxvyze 26/12/2002 wednesday
lmnopa 11/11/2002 tuesday
lmnopb 12/11/2002 wednesday
lmnopc 14/11/2002 friday
lmnopd 19/11/2002 wednesday
lmnope 21/11/2002 friday
where abcdefa, abcdefbc, abcdefc are for course id abcdef
and the other set of course class ids are for course id zxvyz.
and 3rd set relates to course id lmnop.
expectation:
the difference between days for the first set of data to be 0
the difference between days for 2nd set to be 7 days (ie. take the first day for the course class and see if can find another that is the same and then work out the difference i.e monday) then return the difference then go to next course class id.
the diff between 3rd set is calc the diff between Wednesdays, ignore the last friday and find the next course class id. the answer here will be 7 days.
I have worked out the days from the dates (although the above is only an example)but wasnt sure how to pick the same days then work out the difference and then move to the next course class id. Some course classes wont have another same day. -
Find the Difference in time for creation of two activities for the same SR
Hi
I need to find the difference in time of cretaion of two different activities for an SR. Is there any function which I can use to get the same
For e.g.
SR # |Activity Created Date |Duration
123 12-nov
123 13 nov 1 day
Thanks in advance
MeenaThere's a TIMESTAMPDIFF function.
An example from the book Oracle CRM On Demand Reporting has the following example...
TIMESTAMPDIFF( SQL_TSI_MINUTE, Activity."Start Time", Activity."End Time" )
which would return the difference in minutes.
As I type this, I'm thinking you probably know this and your problem is how to get the Activity start time for the next activity into this function. I sorry can't think of any way to do that. -
Finding the difference in no. of days between 2 dates
Finding the difference in no. of days between 2 dates
http://search.java.sun.com/Search/java?col=javafrm&qp=%2Bforum%3A54&qt=days+difference&x=12&y=11
Maybe you are looking for
-
PDF Files with bookmarks open in iPad iBooks without the bookmarks.
PDF Files created with Adobe Acrobat or other PDF file creating software open in iPad iBooks with the Bookmarks. How do you access those.
-
GTX 680 - Windows - AECS6 Not Supported?
Looking at the list of supported cards, I should have no trouble using my GPU in AE for the Raytracing engine... However, my program is telling me that I have an incompatible device/driver. I have the most updated AECS6 (11.0.4) And Nvidia's most rec
-
Spool request from FM REUSE_ALV_GRID_DISPLAY
Hi all, How to create a spool request for an ALV report by using the FM "REUSE_ALV_GRID_DISPLAY". is it possible to create the spool request with this FM's parameter IS_PRINT. Please give some hint if it is possible. Thanks in advance, etienne.
-
Want to store movies in IMovies to External HD
I just purchased a WD Passport 1 TB to empty out my MacBook Pro. I have 12 GBs memory left and wanted to free up some space (since 2007). It came with a USB 3.0 and 2.0 wire, but when I hook up the External HD, it doesn't show up in iMovie 08. Also,
-
Edit with note pad is missing under the File tab
in fire fox 18.0.1 PC win 7 64 bit. When I installed the new fire fox on my new PC, I clicked on 'file' and on hte pull down 'edit with note pad' was not there. How do I get it back so I can edit me HTML files? Thanks for any help