Select all the dates between two txt fields. how?
In a 6i form cursor I need to select all the dates between two provided dates. I have two text fields FLD1 and FLd2 with date datatype. There is no table behind both the fields.
For example
:FLD1:='01-MAR-2013';
:FLD2:='10-MAR-2013';
Now I have to select all the dates from 01-mar-2013 to '10-mar-2013'. how to do it?
Gul wrote:
In a 6i form cursor I need to select all the dates between two provided dates. I have two text fields FLD1 and FLd2 with date datatype. There is no table behind both the fields.
For example
:FLD1:='01-MAR-2013';
:FLD2:='10-MAR-2013';
Now I have to select all the dates from 01-mar-2013 to '10-mar-2013'. how to do it?As'salamualikum Gul
Try this
SELECT TO_DATE('01-MAR-2013', 'DD-MON-RRRR') - 1 + rownum AS d
FROM ALL_OBJECTS
WHERE TO_DATE('01-MAR-2013', 'DD-MON-RRRR') - 1 + rownum BETWEEN TO_DATE('01-MAR-2013', 'DD-MON-RRRR') AND TO_DATE('10-MAR-2013', 'DD-MON-RRRR')Hope this helps
Similar Messages
-
SQL - Can u print all the dates between two given dates (Without PL/SQL)
Hi Friends,
I want to know if u can print all the dates between two given dates without using pl/sql.
date1,date2 are given
write a sql statement to display all the dates lying between those two dates.
An earlier will be appreciated.
Thanks in Advance
Sriram
nullSriram,
Try this....
select to_date('01-JAN-00')+to_number(rownum)
from all_tables
where rownum < to_date('10-JAN-00')-to_date('01-JAN-00')
TO_DATE('
02-JAN-00
03-JAN-00
04-JAN-00
05-JAN-00
06-JAN-00
07-JAN-00
08-JAN-00
09-JAN-00 -
How do you find the average value of all the data between two points on a single channel
I am tring to calculate the average value of all the data points on a single plot between two seperate points
I have attahced an illustration.
Tim
Solved!
Go to Solution.
Attachments:
plot.jpg 173 KBHey smoothdurban,
I've seen Brad's code, and trust me, it's worth the effort to let him help you get it up and running - it's definitely the most ideal way to solve this problem. However, as Brad said, there are multiple ways to tackle this - both interactive and programmatic - so in the meantime, I'll take a second to detail one of the interactive and sure-fire ways to find the average of data between two points on a single channel.
We'll use"Flags." Set up your VIEW graph exactly as you did on your original screenshot, using Band Cursors to approximate the beginning and ending X-values representing the range you want to examine. Next:
1. Click the "Set Flags" button () that is a part of your 2D Axis System. Note that you can hold down the Shift button if you ever decide you want to do this on more than a single curve at one time.
2. Select the "Flags: Copy Data Points" button that enables after Flags are set.
3. This creates new channel(s) in the default (bold) group in the Data Portal that contains only the Flagged data.
4. Select DIAdem ANALYSIS.
5. Select Statistics » Descriptive Statistics.
6. In the Channels input, select the newly created channel containing your Flagged Y-Data.
7. Ensure that the Arithmetic Mean parameter is set. You can preview the data and the result in the dialog before pressing OK to execute the calculation.
You may have noticed that in the Descriptive Statistics calculation, one of the parameters that you can set is the range of channel rows to operate on - so, if you know the row numbers of your beginning and ending X-values, you could just simply run the Descriptive Statistics calculation and use this parameter to operate on a row subset of your original channel instead of the entire channel.
Derrick S.
Product Manager
NI DIAdem
National Instruments -
How to get list of all the dates between two dates
Hi, Can anybody please help me ..
I have two dates in string format ("dd/MM/yyyy).I need to get all the dates in between these two dates.How can I do thin in java
Thanks in advanceLook at classes Calendar and SimpleDateFormat.
And get your abstraction straight: you don't have two dates. You have two Strings that represent a date. To use them, you have to convert them to Date objects first with SDF. -
How can I get extract the data between two cursors on an XY graph
How can I get extract the data between two cursors on an XY graph
Well, you say xy graph, so this might be a more complicated problem.
For a waveform graph it's trivial. Simply get the two cursor indices (property: cursor index) and apply them to array subset of the data. Is that all you need?
Here's how the above code would look like. using cursor.index instead of cursor.x elimnates the need to include scaling information.
For an xy graph, there could be multiple segments (e.g. imagine a spiral that passes the desired x range multiple times from both sides). This would neeed significantly more code for a general solution.
Message Edited by altenbach on 11-24-2009 07:53 AM
LabVIEW Champion . Do more with less code and in less time .
Attachments:
cursorsubset.png 17 KB -
Query the data between two tables
Need help for query the data between two tables
Table 1: Time sheet
P.ID P.Name EmpID HoursSpend DateTime
c12234 Test 25 4 06/12/2013
c12234 Test 25 7 06/13/2013
c12234 Test 25 8 06/15/2013
c12234 Test 5 3 06/21/2013
c12234 Test 2 5 07/15/2013
c12234 Test 25 4 07/21/2013
Table 2: cost table
EmpID FromDate ToDate Rate
25 05/01/2013 06/30/2013 250
2 04/01/2013 05/31/2013 150
25 07/01/2013 09/30/2013 300
Output
P.ID P.Name EmpID HoursSpend DateTime Rate Total (HoursSond x Rate)
c12234 Test 25 4 06/12/2013 250 1000 (4*250)
c12234 Test 25 7 06/13/2013 250 1750
c12234 Test 25 8 06/15/2013 250
2000
c12234 Test 25 4 07/21/2013 300
1200
c12234 Test 2 5 07/15/2013 150
750
===========================================
Total 28
6700
============================================
Here EmpID =2 don't have rate in the cost table on july month should be pick from last entry from cost table.Hi Gopal,
According to your description, it seems that the output needn’t include the row when EmpID=2. Because the DateTime for it in Table1 doesn’t included between FromDate column and ToDate column. After testing the issue in my environment, we can refer to the
query like below to achieve your requirement:
SELECT time.*,cost.EmpID,cost.Rate,(time.HoursSpend * cost.Rate)as [Total (HoursSond x Rate)]
FROM [Time sheet] as time
INNER JOIN
[cost table]as cost
ON time.EmpID = cost.EmpID
AND time.DateTime BETWEEN cost.FromDate AND cost.ToDate
If there are any other questions, please feel free to ask.
Thanks,
Katherine Xiong
Katherine Xiong
TechNet Community Support -
How to share the data between two or more frames
How to share the data between two or more frames based on the database relationship in JDeveloper?
You can pass data between frames by passing it as parameters.
That is when you are invoking another frame, pass your data as arguments through the constructor to that frame .
You can also achieve this through static or public methods, but static variables as we know is not suggested which might occupy more memory space.
Regards,
Srinivasan AShwath
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by [email protected]:
How to share the data between two or more frames based on the database relationship in JDeveloper? <HR></BLOCKQUOTE>
null -
Intervals, synchronize the data between two oracle tables located in diffe
Hi Experts,
Is there any way I can, at set intervals, synchronize the data between two oracle tables located in different servers? What is the software, if there is any? If there are steps I can follow, so much the better.
Thanks!I'm not sure what you want to achieve here...
I want to synchronize both the Servers , so that it can update HO servers as well as Factory Server with the complete data. Could you please elaborate a little bit more; basing on your description I could also tell you how to setup timesync for those two servers if I understand "complete data" as the current date and time...
Also a lot of solutions are platform and version specific so it would help if you could indicate OS and Database Versions (4 digit).
And I still fail to see what this has to do with forms. You might want to post your question to the Database General forum: General Database Discussions
cheers -
How to get the data between two dates?
Hi all,
I am facing a problem of getting the data betwwen two dates.
I have written a query as
"select * from table1 a where a.dt between trunc(sysdate) and trunc(sysdate)-30"
It is not showing any errors or warnings.But the data is not coming though the data is in the table1 between these two dates.
Regards,
KumarYour ordering is probably wrong:
SELECT *
FROM table1 a
WHERE a.dt BETWEEN TRUNC (SYSDATE) - 30 AND TRUNC (SYSDATE) -
Create a table with all the months between two dates
Hi all,
I have a purchase table recording individual purchases. One of the fields is my Date field (date of purchase).
I would like to create a table 'All_months' with two entries ('month_no' and 'month') which will be based on the first and last date in the purchase table. Assuming the first purchase recorded in my purchase table was on the 12th of January 2008, the table should have the following structure:
month_no month
1 12JAN2008
2 12FEB2008
3 12MAR2008
It should continue in this fashion up-to the month where the last purchase was recorded.
I have been struggling with creating the query that would do that for days now and can't find anything when asking Mr Google.
Thanks,
ChrisWelcome to the forum!
Here's one way:
CREATE TABLE all_months
AS
SELECT LEVEL AS month_no
, ADD_MONTHS ( first_date
, LEVEL - 1
) AS month
FROM (
SELECT MIN (date_of_purchace) AS first_date
, MAX (date_of_putchase) AS last_date
FROM purchase
CONNECT BY LEVEL <= 1 + MONTHS_BETWEEN ( TRUNC (last_date, 'MONTH')
, TRUNC (first_date, 'MONTH')
;Do you really need a table like this? Every time you change the data in the purchase table, you won't know if all_months is still accurate or not. You can derive all_months in a sub-query every time you need it, or make all_months a view instead of a table.
Edited by: Frank Kulash on Jun 14, 2012 5:57 AM -
How to get the dates between Two dates excluding Saturaday and Sunday
Dear All,
select to_date('25-04-2012', 'DD-MM-YYYY') + rownum -1 dt
from dual
connect by level <= to_date('05-05-2012', 'DD-MM-YYYY') - to_date('25-04-2012', 'DD-MM-YYYY') + 1;The above query returning the following output,
DT
DT
04/25/2012
04/26/2012
04/27/2012
04/28/2012
04/29/2012
04/30/2012
05/01/2012
05/02/2012
05/03/2012
05/04/2012
05/05/2012here I need to exclude the Dates which comes on 'saturday' and 'sunday' and also the common holiday
Here it is '01-May-2012' and I need the output like the following,
04/25/2012
04/26/2012
04/27/2012
04/30/2012
05/02/2012
05/03/2012
05/04/2012I need the common query to calculate between any two dates.
Can anyone suggest me?
Thank you,
Regsrds,
gurujothiHi Frank,
Sorry for my fault,
The following is my table description,
CREATE TABLE "DATES"
( "FROMDATE" DATE,
"TODATE" DATE,
"LEAVE_ID" Number(5)
Insert into dates values('05-02-2012','05-05-2012',1);
Create table holiday_dates(holidays date);
insert into holiday_dates values('01-05-2012');Now when I used this query,
select count(*) from (select dt
from(
select to_date(fromdate, 'DD-MM-YYYY') + rownum -1 dt
from dates
connect by level <= to_date(todate, 'DD-MM-YYYY') - to_date(fromdate, 'DD-MM-YYYY') + 1
where to_char(dt,'fmday') not in ('sunday','saturday') minus (select holidays from holiday_dates)) dual;
Count(*)
64
Insert into dates values('01/05/2012','05/05/2012',2);
/Now my table has 2 rows,
select * from dates;
FROMDATE TODATE LEAVE_ID
01/05/2012 05/05/2012 1
05/02/2012 05/05/2012 2Now when I used this query,
select count(*) from (select dt
from(
select to_date(fromdate, 'DD-MM-YYYY') + rownum -1 dt
from dates
connect by level <= to_date(todate, 'DD-MM-YYYY') - to_date(fromdate, 'DD-MM-YYYY') + 1
where to_char(dt,'fmday') not in ('sunday','saturday') minus (select holidays from holiday_dates)) dual;The output is ,
COUNT(*)
1987How to get the output using the max(leave_id) like the following,
select..........from... where leave_id=(select max(leave_id) from dates);where to add "WHERE" clause in the above query?
Thank you,
Regards,
Gurujothi.
Edited by: Gurujothi on May 3, 2012 8:43 PM
Edited by: Gurujothi on May 3, 2012 8:44 PM -
Finding the data between two different substrings in a string
Hey guys-
This is probably really easy for someone...I can't figure it out with CF. I've searched a bunch but haven't found exactly what I'm looking for.
I'm searching a HTML document with Coldfusion and need to pull some data from it. Just as a quick example, somewhere in the HTML document there might be some code that looks like (this is obviously super simplified):
<tr><td>Grand Total: </td></tr><tr><td>$1000.00</td> </tr>
I need to do a couple of things. 1) I need to capture the $1000.00 (this amount is dynamic, it will be different on every HTML doc) 2) I need to delete the whole row (or two rows in this example).
I'm guessing it's something along the lines of setting " <tr><td>Grand Total:</td></tr><tr><td> " to a variable, then searching for everything after until it finds </td> and storing that as a variable.... and then for step two storing everything from the <tr><td>Grand Total:</td></tr><tr><td> to the next </tr> as a variable, and then using Replace to take it out of the document. I just dont know how to do the "capture everything from 1 pre-established variable to the next time the code has variable number 2 (in this case, either </td> or </tr>) part.
Any thoughts or help would be so greatly appreciated!
Thanks all!!
JEThanks ilssac...that's definitely helpful, as you said..mine is a little more complex as I need to find a pretty specific line of code and then find the next </td> after (actually, find all of the content between those two).
Any other thoughts? I KNOW someone else has done this. Parsing out HTML documents to capture different pieces of info has to be relatively common....
Thanks! -
FormCalc Formula to tell the difference between two time fields if they are populated - Help please
Hi,
I have a cell (TotalTime1) that references two other time formatted cells (Start1 and Finish 1).
The below formula is intended to tell the difference between the Start and Finish time if they are populated.
I had it working without the HasValue condition but the formula was calculating when there was no value in Start1 and Finish1 (due to time format).
This is the code I do have, it says there is an error near the last line; I am sorry if I post this in the wrong manner, I have not posted on this forum before but here goes:
if (HasValue (Finish1) and HasValue (Start1)) then if (Time2Num(Start1.formattedValue, "HH:MM") < Time2Num (Finish1.formattedValue, "HH:MM")) then Abs (Time2Num(Start1.formattedValue, "HH:MM") - Time2Num(Finish1.formattedValue, "HH:MM")) / (60 * 60 * 1000) else 24 - Abs (Time2Num(Finish1.formattedValue, "HH:MM") - Time2Num(Start1.formattedValue, "HH:MM")) / (60 * 60 * 1000) endif
Any help would be appreciated.
Regards FetachiniThanks whyisthisme,
Your speedy response is greatly appreciated, your support has resolved my issue.
Many thanks.
Regards
Fetachini -
I want to sync the data between two windows device, but I can't find my security key.
Please send me a guide about how to setup the sync data with windows device.
I can't find account management in sync tab.See these Sync KB articles: <br />
https://support.mozilla.org/en-US/kb/how-do-i-set-up-firefox-sync<br />
https://support.mozilla.org/en-US/kb/add-a-device-to-firefox-sync<br />
https://support.mozilla.org/en-US/kb/find-code-to-add-device-to-firefox-sync<br />
https://support.mozilla.org/en-US/kb/how-do-i-choose-what-types-information-sync-firefo -
All Dates between two given Dates
Hi,
I need all the dates between two given dates in select-options .
For example the range in select-options is 01/01/2007 - 31/03/2007 .
I need all the dates between the two given dates .
How can i do this .Is there any FM for this ?
Regards,
Ziause this
CSCP_PARA1_GET_PERIODS
data:begin of daytab occurs 0.
include structure scscp_period_str.
data:end of daytab.
call function 'CSCP_PARA1_GET_PERIODS'
exporting
i_datuv = r_budat-low
i_datub = r_budat-high
i_timeunit = 'D'
tables
et_dates = daytab.
here u have to put one more logic.
loop at daytab where datuv in r_budat.
endloop.
So u will get all the dates
Regards
prabhu
Maybe you are looking for
-
Launching a Preview Session Outside the ATG Business Control Center
I have setup a remote preview server on ATG 10.1.1. Everything works great when viewing it inside the BCC however I’m wondering how to access the preview server outside the BCC. According to the ATG documentation, it sounds like that’s possible. The
-
Error while generating IMG View in project administration.
Hi, When i try to generate IMG project in project administration, systems displays error "Syntax error in prog:000 SAPLSPRO_STATUS". How to resolve this. Regards, Giridhar
-
Hello! I have a printer,Canon MP250 and I bought a new MacBookPro with Maverick and I cannot work this printer with the driver that came with the printer and I've tried to find an update but with no success, can you help me? Thanks!!
-
Hi, I am using the dbms_metadata to get the DDL for all the objects in a particular schema. DDL is retrieved without any issue, but the SQLTERMINATOR is not added in end of any DDL. The property used is dmsf := dbms_metadata.session_transform; d
-
HI, I have been converting a project from LabView 8.5 to 8.6.1 and have been replacing a self written class by another one. While working on this and updating a subVI LabView crashed. When I restarted LabView I could recover some of my work. Later I