Urgent: Removal of sat/sun days from the sql date query
Hi All,
I have a date field in my database table and I would like to get the details from the db table for the condition (SYSDATE - I/PDATE)< 2 i.e I need all the details which are 2 days old. But with this condition I would like to exclude the saturdays and sundays.
Say if I am running this query on wednesday then it returns me the details for sat/sun which I do not want. It sould return me the thursday and friday details.
My question can we this in SQL??? Can anybody help me??
Thanks and regards,
Kshitij
refer to http://technet.oracle.com:89/ubb/Forum88/HTML/002539.html
Similar Messages
-
Regarding subtraction of 10 days from the current date
Need to know how I can get 10 days subtracted from the current date before the report is excuted. This needs to appear in the selection screen before the report is excuted.
The select option contains two fields the first field is the date which is 10 days subtracted from the current date and the next field is the current date.
Please suggest.
Thanks.Hi Dolly
I had a same req before check that code:
AT SELECTION-SCREEN OUTPUT.
IF pa_older = 'X'.
CALL FUNCTION 'RP_CALC_DATE_IN_INTERVAL'
EXPORTING
date = pa_end "<<<<< date or in ur case sy-datum
days = '10'
months = '00'
signum = '-'
years = '00'
IMPORTING
calc_date = pa_end1. " <<< subtracted date
ENDIF. -
Need to display date result but has to exclude sat & sun day
Hi all,
I need to display date (A), from the plan date (B) for qty more than 10, but the result of A, should be B -10 and should not include sat & sunday.
I managed to do in excel but I have problem in oracle sql here.
My quote in excel, =IF(qty<=10, WORKDAY(plan_date,-5), WORKDAY(plan_date,-10))
If qty=12, plan_date is 30/05/11, the result is 16/05/11
qty=2, plan_date is 30/05/11, the result is 23/05/11
Anyone can help me to quote in SQL ?
Thanks.
LimCREATE OR REPLACE FUNCTION GOKHAN.business_date (start_date DATE, days NUMBER)
RETURN DATE
IS
counter number := 0;
curdate DATE:= start_date;
BEGIN
WHILE counter < days
LOOP
curdate := curdate - 1;
IF TO_CHAR (curdate, 'D') BETWEEN 1 AND 5
THEN
dbms_output.put_line( curdate || ' ' || TO_CHAR (curdate, 'D'));
counter := counter + 1;
END IF;
END LOOP;
RETURN curdate;
END;
with t as (
select to_date('30/05/11','DD/MM/YY' ) plan_date, 12 qty from dual
union all
select to_date('30/05/11','DD/MM/YY' ) , 2 from dual
select qty, case when qty <= 10 then business_date( plan_date, 5 ) else business_date( plan_date, 10 ) end plan_date from t;
QTY PLAN_DATE
12 16/05/2011
2 23/05/2011Best Regards,
Gokhan Atil
If this question is answered, please mark appropriate posts as correct/helpful and the thread as closed. Thanks -
I purchased an iPad mini on October 10th. I want to return it and get the new ipad mini retina when it comes out. I am currently still within the 14 day return/exchange window but how can I exchange it if the new ipad mini release date isn't until "later in November", which would be beyond the 14 days from my purchase date? If apple announces a new version of a product you just purchased but won't actually release it for more than 14 days, how can you possibly exchange the one you just bought? Is my only option to return the one I bought on the 10th (so return by 10/24) and then not have an iPad until the new one is available for purchase? Or would it make any sense to return the one I bought, get a new one, which would presumably have another 14 day return window, and then exchange THAT one for the new ipad mini w/ retina when it comes out (hopefully within that second 14 day window)?
Call the apple store you got it from and ask them. Sometimes in the past they've extended the 'no questions asked return' but only Apple can tell you for sure.
-
HT204266 How can I remove my credit card information from the app store?
How can I remove my credit card information from the app store? I would like to have an account without the credit card information.
I would like to put in my credit card only when I am ready to purchase.On your computer's iTunes you should be able to edit your payment info by going into the Store > View Account menu option and logging into your account, and on your account's details page there should be a payment link. If you are doing it on your phone then tap on your id in Settings > iTunes & App Store and tap 'View Apple ID' on the popup - that should also give you a payments link on your account's page.
Changing payment info : http://support.apple.com/kb/HT1918
If you don't get the 'none' option on the payment details screen then do you owe iTunes anything or have any pre-orders/subscriptions due : http://support.apple.com/kb/TS5366 ? -
I am trying to get "First day of the week" data from CLDR spec24 but cannot find where to look for it in the spec. I need this data to calculate numeric value of "LOCAL day of the week".
This data to implement "c" and "cc" day formats that equals numeric local day of the week.
e.g if "First day of the week" data for a locale is 2 (Monday) , it means numeric value for local day of the week will be 1 if it is Monday that day, 2 if it is Tuesday that day and likewise.Hi
If you want to week to be started with Sunday then use the following formula:
TimestampAdd(SQL_TSI_DAY, 1-DAYOFWEEK(Date'@{var_Date}'), Date'@{var_Date}') if it's retail week(starts from Monday) then the follow below:
TimestampAdd(SQL_TSI_DAY, 1-DAYOFWEEK(Date'@{var_Date}'), Date'@{var_Date}')
I'm assuming var_Date is the presentation variable for prompt...
Edited by: Kishore Guggilla on Jan 3, 2011 4:48 PM -
How to subtract a day from the presentation variable @{system.currentTime}
Hello,
How can subtract a day from the presentation variable - @{system.currentTime}
I use the above as a title in the report. However I want to subtract a day from the above variable. How can I accomplish it?
Thanks.Hi,
Did you try the steps which I mentioned above. You can use TIMESTAMPADD function in many places in your report but I think not in title section of the title view.
Also you can try using Narrative view instead of title view to achieve this. Follow below steos:
* Pull another column in the report and change its fx to TIMESTAMPADD(SQL_TSI_DAY, -1, @{system.currentTime})
* Now go to the Narrative view and add the below text in Narrative section of the view.
Active Person Report as of @1
Here @1 assuming the new column created is placed before all the columns in the request.
* Also set the 'Rows to Display' as 1.
* Delete Title view from the report and this narrative view on top of your report.
Hope this helps.
Thanks -
I would like to remove a rather large stye from the eye area of a child in a photo...can someone point me in the right direction please
Cheershey John...hows that?
-
How do I remove Canon " My Image Garden" from the desktop when turning on my computer ?
How do I remove Canon " My Image Garden" from the desktop when turning on my computer ? I have the icon but the program starts up and I have to delete it manually from the desktop to clear my screen for other work...
Are you using a Windows or a Mac? What you're seeing (the backwards L shaped menu) is probably the Canon Quick Menu. If you have a Mac you can go into your applications, select Canon Utilities, then drag Canon Quick menu to the trash and empty trash can. On Windows you'd go to the control panel, select Programs and Features (or Uninstall Program/Add or Remove Program) and uninstall the Canon Quick Menu. Not required for all the normal functions of the printer. You can do the same thing for My Image Garden. Also not required.
-
Why did Apple remove many of my songs from the cloud?
Why did Apple remove many of my songs from the cloud?
Maybe they don't have the same taste in music as you
Apple don't make or 'own' songs - other companies allow Apple to sell them. Sometimes these rights owners remove the songs from the store. Apple can't do much about that. You should make backups of any purchases, since Apple cannot guarantee they will be available in future. -
Get days from the java.util.date class
Does anyone know how to get the days from the java.util.date
class. I'm trying to subtract two dates to get the total days between
the two dates. Any help would be appriciated
RobIf you use the getTime() method, you get the date as a number of milliseconds since a predefined time. You can do arithmetic on that number, such as subtracting two of them to get the number of milliseconds between two Dates, and so on.
-
How can I remove apps no longer wanted from the cloud
How can I remove apps no longer wanted from the cloud? they are not used any more and taking up space.
Welcome to the Apple community Mickeymom.
The apps are not actually in your iCloud storage, they are links to the apps in the App Store. What you are seeing is your purchase history and as such cannot be deleted.
You can however hide your purchases, which you can do from the QuickLinks > Purchased option from the main page in the iTunes Store on your computer. -
Revision: 11959
Revision: 11959
Author: [email protected]
Date: 2009-11-18 14:16:08 -0800 (Wed, 18 Nov 2009)
Log Message:
Removing rpc-encoded id attributes from the referent when used as a multiRef (i.e. referenced via an href attribute). These attributes should not be included in generic deserialization of types to ActionScript (e.g. when deserializing xsd:anyType).
QE notes: Yes, this should fix the regression. We'll still need a further change to remove attributes in SOAP and XSI namespaces.
Doc notes: N/A
Bugs: SDK-23140
Reviewer: Svetlin
Tests run: Checkintests, bug test case
Is noteworthy for integration: No
Ticket Links:
http://bugs.adobe.com/jira/browse/SDK-23140
Modified Paths:
flex/sdk/branches/3.x/frameworks/projects/rpc/src/mx/rpc/soap/SOAPDecoder.asany chance you are using atheros wifi?
-
Getting error when I try to remove eum secondary email address from the Mailbox from Exchange 2013 server. The command works if you issue directly from the server exchange shell.
I open the remote power shell to the exchange server 2013.
Issue the following commands and getting the following error.
$mailbox = Get-Mailbox -Identity testuser$mailbox.EmailAddresses -= "eum:50004;phone-context=telExt5digits.lync5.com"Then getting the following error:Method invocation failed because [System.Collections.ArrayList] doesn't contain a method named 'op_Subtraction'.
At line:1 char:27
+ $mailbox.EmailAddresses -= <<<< "eum:50004;phone-context=telExt5digits.lync5.com"
+ CategoryInfo : InvalidOperation: (op_Subtraction:String) [], RuntimeException
+ FullyQualifiedErrorId : MethodNotFoundHelp!Now for an answer - your remote session doesn't have the same object you have on the server itself. Notice it says this is an array list, not a ProxyAddressCollection. If you need to work around this, you'll need to massage the addresses another
way that the system will accept. I'd try the following:
$NewAddresses = $mailboxEmailAddresses | ? { $_ -notlike "eum:50004;phone-context=telExt5digits.lync5.com" }
See what you get in the $NewAddresses variable when you do this. -
Terms of payment(75 days net from the invoice date.payme25 th of the month)
Hi
I need to configure the below payment term
"75 days net from the invoice date, payment 25 th of the month"
Please suggest me.
Regards
Prasad"75 days net from the invoice date, payment 25 th of the month"
you cann try this
Tcode OBB8
Default baseline date = Document date
Payment terms
Term 1:- Fixed date= 25
Additional months=2
Maybe you are looking for
-
12" Powerbook - I can't quit you, Baby
I'm in love with my 12" G4 PowerBook. It's the most beautiful portable computer ever designed. Look at the keyboard. All the keys are beautifully bevelled, and they are set side by side with no dead space between them. Look at the detail where the ke
-
Hey, I have recently downloaded an Adobe Muse Template design. In the sample the designer created, he / she used a stationary photo in the background. I have used my own photo in hthe background now but when I preview it, there is an automatic swipin
-
Can I change the default paper type for a printer?
I have a client that prints off a lot of paperwork from an insurance company. They have barcodes that go pretty much to the end of the page that are nessesary for fileing. The default print setup cuts off the barcode and a few code numbers. If I manu
-
Explorer.exe consuming 100% CPU after resuming from hibernation
Hello, For the last months, I repeatedly have the problem that sometimes (every 2nd or 3rd time) after resuming from hibernation, in a few cases also after disconnecting from the Internet, one or more instances of explorer.exe are consuming 100% CPU,
-
Hello. I've been working on a linked .mov but when I export to quicktime, i only see the flash content but not the original video. How do i see both togther. Thanks, T.