Formula for dates back 7 days failing because of end of month?

HI I have a CR that has been working fine till now. it runs every Sunday late in the day and looks back past 7 days. it has formula for dates from and to.
tonumber(totext(CurrentDate,'yyyyMMdd'))-6
and tonumber(totext(CurrentDate,'yyyyMMdd'))
yet this past Sunday, it is not giving all previous 7 days. could it be related in any to the end of month? i cant think this is it. but perhaps.the date col is type = NUMBER and in YYYYMMDD.
WHen I ran this report manually by selecting on the dates needed it returns more data.

Hi Paul,
The issue is when you convert a date to number a subtract 6 from it, it doesn't go 6 days back; it just subtracts 6 days from that converted number.
So, today, represented as a number would be 20140804 however, when you subtract 6 from this number you get : 20140798 which of couse is Not a date.
Your code (if the dates are stored as number in the database) should be :
tonumber(totext(CurrentDate-6,'yyyyMMdd'))
-Abhilash

Similar Messages

  • Connection Source for .... failed because the environment is not trusted

    I got a message like this -
    Connection Source for .... failed because the environment is not trusted
    when trying to bind a field to a data connection field. What does this mean? I setup the data connection and it tested out fine.

    I am not exactly sure what you are referring to by the see "Note". I didn't find a "Note" that was related. The only thing I did find was the following:
    "If you are using external data sources in a form design that you want users to fill in Adobe Reader, you must set usage rights for the form by using Reader Extensions Server."
    I am only trying to display back information out of a database. I don't want to write information. Is there any way to get around this?
    Matt

  • My time machine back up failed because it says the backup volume could not be mounted

    My time machine back up failed because it says the backup volume could not be mounted.  What does that mean and how do I fix it so that it backs up?

    A  whole  lot  about  Time  Machine for help with TM problems.  Also you can select Mac Help from the Finder's Help menu and search for "time machine" to locate articles on how to use TM.  See also Mac 101- Time Machine.
    Use Disk Utility to repair the TM drive.  If that doesn't help, and you don't find help from the above, then erase the drive and start a new TM backup.

  • I am unable to get past the first step of Winston Churchill's answer because my phone says "checking for a software update failed because you are not connected to the Internet". Did my WiFi connection also get lost?

    I am unable to get past the first step of Winston Churchill's answer because my phone says "checking for a software update failed because you are not connected to the Internet."  Did my iphone's WiFi connection also get lost with the Contacts, Mail and Text Messages?  When I tried the software update, as recommended by Winston Churchill, the iphone was connected to my desktop which is connected to the Internet.

    You can't use your computers Internet connection to update your phone from the phone itself. If you want to use the computers Internet connection to update your phone you must update it through iTunes.

  • Help - formula for date automatically displayed as per given frequency period

    Details of report received date and delayed no of days  in submission
    S/No
    Details of Report
    Frequency
    Date as per Frequency (Target Date)
    Received up to as on
    lapse of days
    Fin per Day
    Fine Amount
    24.07.2014
    (Rs.)
    1
    Cash book
    Daily
    24.07.2014
    30.06.2014
    24
    10
    240
    2
    DSR
    Previous Day
    23.07.2014
    31.05.2014
    53
    10
    530
    3
    Day book hard copy
    Thursday & Monday
    Formula Required latest date for Thursday or Monday and date with in cell E4
    10
    0
    4
    Asset stock
    Fortnight
    Formula Required latest date for 15 th day  or last date of month and date with in  cell E4
    10
    0
    5
    Labour approval 
    1st Day of Month
    Formula Required 1st day date of month with in cell E4
    10
    0
    6
    Qty as per drawing
    Every Quarter
    Formula Required last day date of quarter of the year with in cell E4
    10
    0
    Note: I want simply enter the date in  E4 and the formula calculated the date in column D 

    do you want to calculate the date format directly? see the sample:
     =DATEVALUE(TEXT(date,"d/m/yy"))
    KR

  • Use formula for date range instead of parameter?

    I am designing a Crystal report that will always pull records for the next full week.
    Example:  Today is 8/4, so I need the report to pull data for dates 8/11 through 8/15.
    Currently, I am using parameters each time to run this report.
    Is there a formula that could automatically pull this date range without using parameters in my report?
    Any help is appreciated.
    Thanks.

    This is actually not too difficult.  Assuming you want to be able to run this on any date and get the "Next Full Week" starting on Monday (based on your date range above), here's what you could do:
    1.  Create a formula that I'll call {@StartDate}
    NumberVar dow := DatePart('w', CurrentDate, crMonday) - 1;  //Day of week, starting on Monday.
    NumberVar days := 7 - dow;
    CurrentDate + days
    2. Create a formula that I'll call {@EndDate}:
    {@StartDate} + 7
    3.  In the Select Expert, manually edit the selection formula to use these date formulas instead of the parameters.
    -Dell

  • Basic functions (high) in query formula for highest # of days past due

    Hi All,
    I hope you can help.  I am trying to create a formula in a query for FIAR Line Item Cube (0fiar_c03).  I would like to calculate the hightest number of days past due for open line items.  There is an operator 'high' in basic functions within the query formula.  Is it possible to use this?
    Regards,
    Cheryl Adamonis

    There is a workaround usind conditions.That is you can try to filter the top 10 % or top 10 after calculating the no of days past.However this way you will not be displaying complete dataset

  • UDF for Date -7 days

    Hi everyone
    I am fairly new to Java and PI, and I have to create a UDF that takes the currentDate and subtracts 7 days. I was just wondering the best way to go about this with java?
    Thank You

    UDF Code as below ..
    Calendar now = Calendar.getInstance();
    now.add(Calendar.DATE, -7);
    String subtractSevenDays = new SimpleDateFormat("yyyy/MM/dd").format(now.getTime());
    return subtractSevenDays;
    // Dont forget below import statements
    import java.text.SimpleDateFormat;
    import java.util.Calendar;
    Map it to target field. 
    Note: You can choose any pattern in the above SimpleDateFormat argument.
    Currently the output will be ex:    2011/04/01
    Edited by: Baskar Gopal on Apr 8, 2011 10:56 AM

  • Which external hard drive should I buy for data back up?  Thanks

    emac g4   Mac OS X (10.3.9)  
    emac g4   Mac OS X (10.3.9)  

    Hello Seventree and welcome to discussions,
    If I can assume that the title of your post is your entire question....
    Make sure its Firewire - That way, you can boot up the eMac in the, unlikely, event of an internal drive failure / problem. You cannot boot PPC Macs from a USB drive.
    Get the biggest you can afford. The external may well outlive the eMac! Many machines now " ship " with 500 Gig drives. That amount is only likely to increase.
    Maxtor is one brand that seems to be well regarded among many here. I am sure there will be other suggestions for you.
    Regards
    Ian

  • CREATE ASSEMBLY for assembly Assembly Name failed because the assembly is built for an unsupported version of the Common Language Runtime.

    Not sure if this is an SQL or C# question, but here it goes:  I am trying to create my first CLR assembly for SQL using C#.  I found several examples online, and am following them.  However, when I try to load my assembly into the SQL Server,
    I receive the aforementioned error.  I've googled the heck out of it an am coming up with nothing.  Anyone have an idea that can point me in the right direction?

    SQL Server 2008 uses .NET Framework 3.5 SP1 (and, really, the base portion of the framework is just 2.0 with updates, 3.0 and 3.5 just update the 2.0 base and add some new assemblies). If changing the VS2010 to 3.5 didn't do it, I'd try starting out with
    an entire new project and set the target to 3.5 at project creation time. Unless you're using some odd referenced assemblies that are version 1.1 or 4.0, this should work (I've been using VS2010 with 3.5 targets for SQLCLR for quite a while without incident).
    Hope this helps, Cheers, Bob Beauchemin, SQLskills

  • Virus-Check for the installation-file failed because there is a password needed. Can someone tell me the password? Adobe Flashplayer.

    Ich arbeite mit Bitdefender als Antivirus Software und checke grundsätzlich Installationsdateien vor der Installation. Kann mir jemand weiterhelfen. Danke und auf bald.

    Ich arbeite mit Bitdefender als Antivirus Software und checke grundsätzlich Installationsdateien vor der Installation. Kann mir jemand weiterhelfen. Danke und auf bald.

  • Connection for srouce dataconnection failed because the environment is not trusted

    HI all I keep gettng this message when I
    preview the page
    i get this message that sayd he the connection for the source dataconnection failed because the environment is not trusted
    can anyone help??

    Here is a blog entry that discusses how to deal with getting specific records etc....
    http://forms.stefcameron.com/2006/09/29/selecting-specific-database-records/
    Note at the bottom of the blog he mentions new security rules in version 8. Make sure you follow that link and look at the section on cloning ....you will need to do that in your script.
    Once you are on that blog you can search for your "Environment not Trusted" error. There were a couple of hits in the Q/A sections at the bottom of the blog. There is no definitive answer but there was a couple of suggestion there.
    Also if you go a google serach on "Environment not Trusted" there are numerous hits on different discussion forums. You may get your answer from one of those. If you  find the answer can you post it back here please?
    paul

  • TS3992 My iPad hasn't backed up to iCloud for 2 weeks so I've connected it to my laptop and it still won't backup and this is AFTER I paid for extra iCloud storage. I'm so frustrated because it keeps saying back-up failed but I don't know why.

    My iPad hasn't backed up to iCloud for 2 weeks after repeated attempts even AFTER I paid extra for more iCloud storage. I've connected it to my laptop and it still won't backup. I'm so frustrated because it keeps saying back-up failed but I don't know why. Please help, thanks!

    To back up to your computer, right-click on the name of your iPad on the left side of iTunes and click Back Up.  (If running iTunes 11, first go to View>Show Sidebar.)
    To get your iPad to back up to iCloud again, try deleting your last backup (if you have one) by turning off iCloud Backup in Settings>iCloud>Storage & Backup, then tap Manage Storage, swipe across your backup and tap Delete, then go back and turn iCloud Backup back on again.  If it still won't back up, you may have an app that is preventing the backup from succeeding.  To locate which one, go to Settings>iCloud>Storage & Backup>Manage Storage, tap the name of your device under Backups, under Backup Options tap Show All Apps, then turn them all to Off (including camera roll) and try backing up again.  If it succeeds, then the camera roll and/or one of your apps is preventing the backup and you'll have to located by process of elimination. Turn the camera roll On and try backing up again.  If it succeeds, turn some of your apps to On and try backing up again.  If it succeeds again, turn some more apps to On then try again; repeat this process until it fails.  Eventually you'll be able to locate the problem app and exclude it from your backup.
    If it still won't back up you may have network issues connecting to the iCloud server.  Solutions to that include power-cycling your wireless router (unplugging it for 15 seconds, then plugging it back in), resetting network settings on your phone (in Settings>General>Reset), updating the firmware on your router, and changing the router's DNS settings to use Google's public DNS (see https://developers.google.com/speed/public-dns/docs/using).

  • How can I disable the touchpad and mouse shortcuts for go back a page? I keep accidentally going back a page and losing tons of data because of it.

    I've looked in both Windows 7's system options and Firefox options for ways of disabling this autoshortcut for going back a page, but there doesn't seem to be one. I'll be using the touchpad, sliding my fingers across, when I somehow activate a shortcut for "Go Back a Page" and end up losing tons of data on a form or chat or game.

    You can set mousewheel.with*.action pref(s) like mousewheel.withcontrolkey.action to 0 to perform a scroll.
    mousewheel.withcontrolkey.action
    mousewheel.withnokey.action
    mousewheel.withshiftkey.action
    mousewheel.withaltkey.action
    mousewheel.withmetakey.action
    See:
    * [http://kb.mozillazine.org/About:config_entries#Mousewheel.]
    * [http://kb.mozillazine.org/about:config]

  • The operation failed because of a protection agent failure. (ID 998 Details: No more data is on the tape (0x80070450))

    For the past couple of days I have been getting the following alert on my tape backups:
    Cannot verify tape data.
    The operation failed because of a protection agent failure. (ID 998 Details: No more data is on the tape (0x80070450))
    It has completed the backup but I get this error when performing a verify or when I try and restore.
    This error only occurs on the same server we backup in the protection group. The other 5 servers backup fine.
    We are using DPM 2010 (3.0.8195.0)

    Same here.
    When I came back from vacation I found the same error in our DPM 2012.
    The operation failed because of a protection agent failure. (ID 998 Details: No more data is on the tape (0x80070450))
    I cannot find anything in the eventlog saying that the tapelibrary has been offline.
    How can I check that?
    Last nights tape-job went "almost" well, one server (VM) still has this error. (But I dont know if that depends on the fact that it had status "Missing" in hyper-v manager due to a Win-update shutdown on a host that had a  misconfiguration (auto-reebot).)
    I rebooted the DPM-server this morning and then I tried to manually run all tapejobs again but they get this status again.
    I do not understand this error and why it suddenly appears to work again for a scheduled job but not when I trigger the job manually.
    Is there not a solution for this?
    /Anders

Maybe you are looking for

  • My note book ( Pavilion G series) displays a fan error on startup .

    My note book  ( Pavilion G series) displays a fan error on startup and fails to boot unless I press Enter. The cooling fan is not working. What to do. i purchased it just a month back. i am using windows 7.

  • I have problem setting up a new wireless keyboard and my new Mac mini

    I have problem setting up a new wireless keyboard and my new Mac mini

  • 508 compliance Rendering

    Hi , Could you please let me know how to dynamically change the 508 compliance to normal view and from normal view to 508 compliance. I was able to change the accessibility mode in triandad.xml file to screen reader to change the normal UI to 508 com

  • Icon in the titlebar of a JDialog

    Hey, I'd like to put a small .gif Icon into the titlebar of a JDialog - is this possible? Normally I use this with a JFrame - how's that with a JDialog? this.setIconImage(new ImageIcon("myPackage/a-small-happy-face.gif").getImage());

  • My color swatches are messed up

    My apologies for posting this again but forum search is serious crap and I can't find my previous post from just a few months ago. If you look at the attached jpg you'll see my swatches repeat themselves. You can't see it but it I were to make a QT m