In SQL server, how can I pass a date and return on any specific day of the week (e.g. Sunday/Monday/Wednesday, etc.)

In SQL server, I want to be able to have a function to return the date of any specific day of the week by passing two parameters. E.g.:
parameter 1: a selected date (e.g. 8/3/2013)
parameter 2: any specific day of the week (e.g. Wednesday)
result: should be 7/31/2013 (8/3/2013 is a Sunday in the week 7/28 - 8/3, so the Wednesday should be 7/31/2013)
then if I want to get Saturday of that week, I can simply change the second parameter to 'Saturday'
Thanks.

Wrong forum:
http://www.microsoft.com

Similar Messages

  • HT201250 how can i pass information from one mac to another mac by using the time capsule

    how can i pass information from one mac to another mac by using the time capsule

    If you want to transfer files, settings, etc., you must open Migration Assistant (Applications > Utilities) in the Mac that you want to transfer the files and follow the instructions

  • How can I save my data and the date,the time into the same file when I run this VI at different times?

    I use a translation stage for the experiment.For each user in the lab the stage position (to start an experiment) is different.I defined one end of the stage as zero. I want to save the position , date and time of the stage with respect to zero.I want all these in one file, nd everytime I run it it should save to the same file, like this:
    2/12/03 16:04 13567
    2/13/03 10:15 35678
    So I will track the position from day to day.If naybody helps, I appreciate it.Thanks.

    evolution wrote in message news:<[email protected]>...
    > How can I save my data and the date,the time into the same file when
    > I run this VI at different times?
    >
    > I use a translation stage for the experiment.For each user in the lab
    > the stage position (to start an experiment) is different.I defined one
    > end of the stage as zero. I want to save the position , date and time
    > of the stage with respect to zero.I want all these in one file, nd
    > everytime I run it it should save to the same file, like this:
    > 2/12/03 16:04 13567
    > 2/13/03 10:15 35678
    >
    > So I will track the position from day to day.If naybody helps, I
    > appreciate it.Thanks.
    Hi,
    I know the function "write to spreadsheet file.vi"
    can append the data
    to file. You can use the "concatenate strings" to display the date,
    time as well as data... Hope this help.
    Regards,
    celery

  • How can I get a date picker or wheel to show up in the form to make filling in a form with a lot of

    how can I get a date picker or wheel to show up in the form to make filling in a form with a lot of dates more easy?

    There is no built-in date picker available for forms created in Acrobat. There are some third-party solutions involving JavaScript (either a large collection of fields or a custom dialog) though. Also, text fields with date formatting will use a wheel type date picker on Android/iOS devices with Adobe Reader.

  • HT5312 So I have a problem with iTunes not letting me download anything without first responding to some security questions which I don't remember setting up, how can fix it? Oh, and it won't let me reset the questions either!

    So I have a problem with iTunes not letting me download anything without first responding to some security questions which I don't remember setting up, how can fix it? Oh, and it won't let me reset the questions either!

    If you mean that you aren't getting the reset link, then from the page that you posted from :
    Note: The option to send an email to reset your security questions and answers will not be available if a rescue email address is not provided. You will need to contact iTunes Store support in order to do so. 
    You can contact iTunes Support in your country via this page : http://support.apple.com/kb/HT5699
    When they've been reset you can then use the steps half-way down the HT5312 page that you posted from to add a rescue email address for potential future use

  • HT2305 how can I correct my date and time on my 3G?

    How can I correct my date and time on my 3G? Thanks in advance!

    Just trying to go along the free route. I found Garage Buy   This doesn't work to well but lets you create an applescript and enters the auction into ical. Then you can set ical to run the script once it gets closer to the time.
    Ical only lets you set a time of a minute before the date. So you have to edit the script to add a Delay 59 to have it run 1 second before. From a few refreshes of the time page it looks like ebay time is a second behind, that could be easily be due to time to load the page. anyway i'll opt for a delay of 57secs and give that a try.

  • How can I architect my data layer to yield query result pages to the application as SQL Server prepares them?

    I tried to make the question as explicit as possible.
    Refer to Sql Server Management Studio's Results view.  Depending upon the structure of the execution plan, the Results pane may begin displaying results while the query is still executing.  Can someone point me in a direction for architecting a
    data layer (I am tech and framework agnostic for this task. Any solution will suffice) that will begin receiving pages of the set before SQL Server has completed the entire query?
    The call from the data layer to SQL Server will obviously have to be asynchronous, but is there any additional ceremony that I need to be aware of when issuing OPTION (FAST x) to the query optimizer?

    Thanks for the reply. (I actually meant to put this in the SQL Data Access forum, not the T-SQL forum)
    "Generally the last step is ORDER BY in a
    query, so nothing can start before that executes."
    I would imagine you cannot ORDER BY and yield results as they are fetched because of the execution plan that would be generated.  For the purposes of this post, please assume that sorting will be done purely client side
    "Can you post your query?"
     For purposes of discussion, let's assume that the query is
    select *
    from information_schema.columns
    and also assume that you have "lots" of columns to display.
    This was an exploratory question to see what would be necessary to replicate the behavior of Management Studio's Query Result view in a custom application. 
    I would imagine that there's going to be a lot of analysis of the execution plans that get generated in order for the OPTION (FAST x) optimizer hint to do any good, but apart from general tuning concerns that would allow SQL SERVER to yield a page of data
    "fast", I was wondering if there was anything else required of the calling client to force it to yield return its first page.
    After thinking about this (and phrasing it the way I did in the last sentence) perhaps this is the incorrect forum for this question.  I imagine that my concerns are better addressed in forums dedicated to the technology of the calling client (which
    would be a .NET assembly)
    Be that as it may, if there is any ceremony that SQL Server imposes on clients in order to yield return, I would expect that my question would be in the scope of SQL Server discussions (even though I intended this to be in a different SQL Server forum)

  • How can I set my date and time to ebay network time server?

    In the system preferences I would like to set the date and time to ebay UK time?
    I thought a quick google would be bring up the server and I can't find it.
    At the bottom of every ebay page there is a link to official ebay time
    But its not a live feed of time to get it to the second.
    I want it to be accurate so that I can use applescript to snipe bargins.
    Many Thanks
    Matt

    Just trying to go along the free route. I found Garage Buy   This doesn't work to well but lets you create an applescript and enters the auction into ical. Then you can set ical to run the script once it gets closer to the time.
    Ical only lets you set a time of a minute before the date. So you have to edit the script to add a Delay 59 to have it run 1 second before. From a few refreshes of the time page it looks like ebay time is a second behind, that could be easily be due to time to load the page. anyway i'll opt for a delay of 57secs and give that a try.

  • How can I save my data and be back to normal operation.

    Hello everyone,
    I'm using P7 with Oracle XE on a stand alone computer, I am unable to connect to my Primavera DB, the issue started when my computer slowed down and i just restarted it...while disc checking computer delet some of the file. may be this is the reason.
    I didnt loss my login name and pasword as this is standard as "ADMIN" after restarting the computer when i tried to login Primavera with same admin as lagin name and password this message is appear "Unable to connect to the database. Would you like to configure the database connection now?"
    What is the best and the safest way to get back to normal situation where I can have all my data back, could anyone please help me? How to I back it up and restore to normal?
    Thanks in advance.

    You will be configuring the connection, it shouldnt mess with the database at all. You are making sure the connection between P6 and the database is setup correctly. When you click on the elipses (...) next to database on the log in screen, does it show anything under "Details"?
    That being said there will be a way to backup/copy the database using the database utility not P6. With SQL it is fairly easy so I assume in Oracle it should be too. The database tool wont be application specific so you will need to look at the Oracle database documentation. For SQL it can be as simple as highlighting the P6 database (PMDB) and running the backup tool. You end result is a .mdf and .ldf which are your backup files. Don't know what Oracle's will look like.
    Hope this helps.

  • How can we see Last Date and last quantities in Bex Analyzer ?

    H&#305; BW Gurus,
    I have a query that shows consumption quantities for a material regarding to a date interval. On initial screen i specify a material and a date interval ( 01.04.2007 - 15.04.2007 for example). Then query brings total consumptions(261 and 601 movement types) for materials. I set up the query according to stock cube.
    But my client wants the last consumptions (last 601 and last 261) quantities and dates in a different columns. When we include calendar day it can be seen easily all the lines day by day. But we dont want to include calendar day. Thus for one material only one row will be exist. Report template will be like that:
    On initial screen we defined april 2007 , Output:
    Material         Total consump. quantity     Last Consump. Quant.   Last.Cons.Date
    XYZ                         457                                 76                        18.04.2007  
    PS: 76 is included in 457.
    How can we achieve this result?
    Thank you all indeed
    Evren Temiz
    Message was edited by:
            Evren Temiz

    Hi Evren,
    What do you mean?
    Regards.

  • How can I remove iTunes 11 and return to a functional version of iTunes?

    So I was really stupid and updated my perfectly operational version of iTunes to version 11.  After discovering that version 11 is almost totally non-functional (missing a number of useful functions that someone decided were too helpful I guess), I want to delete this horrid example of software non-functionality and return to the last functional version (iTunes 10).  Please tell me there's a way to remove this software wart and return to a functional iTunes.

    I found the following way to return to 10.7.  I moved the following directories and files to the desktop before I deleted iTunes 11:
    Album Artwork (folder)
    iTunes Media (folder)
    Previous iTunes Libraries (folder)
    The following file is found in the Previous iTunes Libraries:
    iTunes Library 2012-11-29.itl (the date on your file will vary depending on when you decided to add version 11)
    The following are files found in the iTunes directory
    iTunes Library Genus.itdb
    iTunes Library Extras.itdb
    Once you have copied these files to your desktop, you have to remove iTunes 11.  I used the uninstall option in CleanMyMac.
    I used this explanation to return to iTunes 10.7:
    Replace the iTunes 11 application with iTunes 10.7
    https://discussions.apple.com/message/20431349
    iTunes 10.7 for OS X  http://appldnld.apple.com/iTunes10/041-7195.20120912.d3uzQ/iTunes10.7.dmg
    You will have to rescue your old iTunes library from your Previous Libraries folder and rename it iTunes Library.itl because a newer version of iTunes irreversibly updates your library file.  See:
    https://discussions.apple.com/mesage/20401436 - turingtest2 11/2012 post on rebuilding empty/corrupt library after upgrade/crash from previous iTunes library file.
    iTunes: How to re-create your iTunes library and playlists - http://support.apple.com/kb/ht1451
    Other issues:
    https://discussions.apple.com/message/20432309 - solution to mobile devices saying they need to be restored after downgrading
    Once you have reinstalled 10.7, put the files and folders you copied to the desktop back into iTunes overwriting the new files that were created during the install.  Restart iTunes and you should see iTunes start to reinstall all the missing files.  This doesn't seem to recreate the playlists but I can fix that problem myself.
    So far, it seems to be working.  YMMV and I'm not recommending you try this, I'm just saying that it's worked for me.

  • How can I uninstall firefox 4 and return to the version prior?

    I would like to uninstall firefox 4 and return to the prior version. how can I do this?

    To downgrade to Firefox 3.6 first uninstall Firefox 4, but do not select the option to "Remove my Firefox personal data". If you select that option it will delete your bookmarks, passwords and other user data.
    You can then install the latest version of Firefox 3.6 available from http://www.mozilla.com/en-US/firefox/all-older.html - it will automatically use your current bookmarks, passwords etc.
    To avoid possible problems with downgrading, I recommend going to your profile folder and deleting the following files if they exist - extensions.cache, extensions.rdf, extensions.ini, extensions.sqlite and localstore.rdf. Deleting these files will force Firefox to rebuild the list of installed extensions, checking their compatibility, and reset toolbar customizations.
    For details of how to find your profile folder see https://support.mozilla.com/kb/Profiles
    What problems are you having with Firefox 4?

  • How can I filter messages that do NOT contain a specific word in the subject?

    I want to do the opposite of what filtering normally does. I want to filter out messages that do not contain a word or a string.
    For example, I want to display emails that do not contain the word "meeting" in the subject.
    Is this possible? If so, how can it be done?

    It's not built in. The TotalQuickFilter extension allows NOT and lots of other filter features:
    https://addons.mozilla.org/en-US/thunderbird/addon/totalquickfilter/

  • How can I tell if data was transferred to my MacBook Pro after the Migration Assistant process was stopped?

    I began Migration Assistant and after about 4hrs into the transfer I decided to quit. How do I find out if any data was transferred to my Macbook Pro from my Windows 7 pc?

    iMac Obsessed wrote:
    I've had my MacBook Pro Retina since the 17th and am only now realising that my firewall was not on. I've already connected to a network via ethernet at my job so that I can have access to the internet. How can I tell if my personal info is safe?
    As long as you are behind a router, you don't need to have your firewall turned on at all, in fact it probably slows your computer and/or internet connection down a bit. The only time you need it is to either protect yourself against intrusion from others on your local network or if you hook your computer directly to a cable / DSL modem. See Thomas Reed's Do I Need a Firewall?

  • How can I remove nokia belle and return to Anna?

    I have an E7-00 that was recently replaced under warranty as the usb port had become very iffy and it was almost impossible to charge.  The replacement phone has Belle installed, which is the most un-useable piece of software I have seen in a fair while.  It is far less useful for business than Anna was, and I need to remove it and step back to Anna, if only because I used to be able to have 4 email inboxes on my front screen as well as the time, profile, date AND notifications area... now this takes three home screens to achieve which is completely useless.
    Short of binning the phone and returning to an E90 (beginning to wish I'd never moved away from it) how can I make my E7 useable again?

    your request is being summarily denied. just read this forum. there are even separate threads for anna roll-back and no heed/hear from nokia!
    they clearly maintain their stance.
    it's not going to work out. i share your pain and frustration.
    desperately waiting for an update from "Symbian Belle 111.030.0609" to "Nokia Belle" with all the fixes, and without any new tumours!

Maybe you are looking for

  • This program has been installed on my laptop but for some reason I cannot access my Inbox.

    No folders appear on the screen so i cannot see any received mail. I can access this if I go through Google so am very confused as to why this has happened. I am a new user, but do not think that I have done anything to loose the files. When the prog

  • Firefox Won't Open a New Tab.

    I can not open a blank tab by right clicking the tabs then left clicking on new tab, nor by pressing CTRL & T or clicking the plus button by the far right side of all the tabs. I can only open a link to a new tab. Although it is not a major detriment

  • WRT120N Wireless Connection Problems

    I'm having trouble connecting to my router all the time.  When I first set up this router my laptop could see the SSID just fine.  I clicked Connect, entered password, etc.  computer said I was connected, but I could not access the internet.  I am us

  • Error Useing with LSMW recording Maintenace Plan Schesule period update

    Hi Experts, I have one quary i am using Lsmw recording methode to update schedule period of around 4000 ,aintenamce plans, i created Lsmw but it is reading when i want batch input session Overview time i get following message. please help me "LEAVE T

  • Unable to find service controller in NWDS 7.0.9 installed on windows 7

    Dear All, I am unable to find the service controller, when i perform apply template on component controller. The NWDS version is 7.0.9 and the OS version is windows 7. Regards, Sam.