1st negative date

Post Author: mbunschoten
CA Forum: Formula
I have a column that holds a running balance by day of materials available. It sometimes happens that this balance goes negative on a certain day. What I want to do is pull only the date when it first went negative and show that date in the material group header.
I had this working in Report Builder using the PREVIOUS function and some nested IIF's but Crystal wont allowed for a
formula to refer to itself.
Any help would be greatly appriciated.
Thanks,
Marco

javaUserMuser wrote:
How can I express/convert the date (for example) 02(d)-05(m)-1930(y) compared to 01-01-1970
This is for birthdays for older people for example.
it is clear that it must be a negative long value but, is there any (standart) programatic means by which I can calculate that?
Thanks
DateFormat formatter = new SimpleDateFormat("dd-MM-yyyy");
Date grandsonBirthday = formatter.parse("15-05-1970");
Date grandmaBirthday = formatter.parse("15-05-1920");
System.out.println(grandmaBirthday.before(grandsonBirthday)); // this prints true%

Similar Messages

  • Negative data file size

    RDBMS: oracle 10g R2
    when execute to statement to determinate size of data files, the data file DATA8B.ORA is negative, why?
    before droped a table with 114,000,000 rows in this tablespace.
    FILE_NAME FILE_SIZE USED PCT_USED FREE
    G:\DIL\DATA5D.ORA 4096 3840.06 93.75 255.94
    Total tablespace DATA5---------------------------> 16384 14728.24 89.9 1655.76
    I:\DIL\DATA6A.ORA 4096 3520.06 85.94 575.94
    I:\DIL\DATA6B.ORA 4096 3456.06 84.38 639.94
    I:\DIL\DATA6C.ORA 4096 3520.06 85.94 575.94
    I:\DIL\DATA6D.ORA 4096 3520.06 85.94 575.94
    Total tablespace DATA6---------------------------> 16384 14016.24 85.53 2367.76
    G:\DIL\DATA7A.ORA 4096 3664.06 89.45 431.94
    G:\DIL\DATA7B.ORA 4096 3720.06 90.82 375.94
    G:\DIL\DATA7C.ORA 4096 3656.06 89.26 439.94
    G:\DIL\DATA7D.ORA 4096 3728.06 91.02 367.94
    G:\DIL\DATA7E.ORA 4096 3728.06 91.02 367.94
    Total tablespace DATA7---------------------------> 20480 18496.3 90.3 1983.7
    G:\DIL\DATA8A.ORA 3500 2880.06 82.29 619.94
    G:\DIL\DATA8B.ORA 4000 -2879.69 -71.99 6879.69
    Total tablespace DATA8---------------------------> 7500 0.37 5.14 7499.63

    the query is:
    select substr(decode(grouping(b.file_name),
    1,
    decode(grouping(b.tablespace_name),
    1,
    rpad('TOTAL:', 48, '=') || '>>',
    rpad('Total tablespace ' || b.tablespace_name,
    49,
    '-') || '>'),
    b.file_name),
    1,
    50) file_name,
    sum(round(Kbytes_alloc / 1024, 2)) file_size,
    sum(round((kbytes_alloc - nvl(kbytes_free, 0)) / 1024, 2)) used,
    decode(grouping(b.file_name),
    1,
    decode(grouping(b.tablespace_name),
    1,
    sum(round(((kbytes_alloc - nvl(kbytes_free, 0)) /
    kbytes_alloc) * 100 / b.nbtbs,
    2)),
    sum(round(((kbytes_alloc - nvl(kbytes_free, 0)) /
    kbytes_alloc) * 100 / b.nbtbsfile,
    2))),
    sum(round(((kbytes_alloc - nvl(kbytes_free, 0)) / kbytes_alloc) * 100,
    2))) pct_used,
    sum(round(nvl(kbytes_free, 0) / 1024, 2)) free
    from (select sum(bytes) / 1024 Kbytes_free,
    max(bytes) / 1024 largest,
    tablespace_name,
    file_id
    from sys.dba_free_space
    group by tablespace_name, file_id) a,
    (select sum(bytes) / 1024 Kbytes_alloc,
    tablespace_name,
    file_id,
    file_name,
    count(*) over(partition by tablespace_name) nbtbsfile,
    count(distinct tablespace_name) over() nbtbs
    from sys.dba_data_files
    group by tablespace_name, file_id, file_name) b
    where a.tablespace_name(+) = b.tablespace_name
    and a.file_id(+) = b.file_id
    group by rollup(b.tablespace_name, file_name);
    the same negative data file size on Database Control...

  • Diff. between contract cash flow starting date&the 1st posting date

    gusy , please if some 1 know where can i post the real estate threads don't hesitate 2 send me the link cuz i can't find it yet ...
    i would like to ask also about the diffrence between contract cash flow starting date and the 1st posting date of the contract?? isn't it necessary for those 2 dates to be identical ?? because when i receive or realize cash from that contract i've to post it ..

    Hi,
    the difference is quite easy to explain.
    contract cash flow starting date is the date sap uses when generating the cash flow, this is used if you have contracts in sap that were created before you using sap and where you would want to see the cash flow for information reasons.
    The 1st posting date of the contract is actually the date beginning of which sap will be posting the conditions.
    Say your cash flow starting date is 01 January 2007 and your 1st posting date is 01. july 2007, yor cashflow will show you what would have been posted, if the contract had been handeled in sap from january through june, starting in july, it shows what is to be and what actually has been posted.
    As to your question regarding a sap re-fx forum, please use your search, we are still trying to get enough people interested and there is a thread where you can sign up. Until then, feel free to post your questions in the Financials forum.
    Ute

  • How to find out last month's 1st & last date

    could you please tell me how can I find out last month's 1st & last date?
    regards

    Here is one way:
    SQL> SELECT  ADD_MONTHS
      2          ( TRUNC(SYSDATE,'MONTH')
      3          , -1
      4          )                                    AS FIRST_OF_MONTH
      5  ,       TRUNC(SYSDATE,'MONTH') - 1           AS LAST_OF_MONTH
      6  FROM    DUAL
      7  /
    FIRST_OF_MONTH      LAST_OF_MONTH
    05/01/2010 00:00:00 05/31/2010 00:00:00

  • July 1st despatch date problem UK?

    just wondering if anyone whose phone was despatched on 1st for UK delivery is having problems with tracking on TNT's website, I'm a little concerned as I booked 5th and 6th off of work to take delivery, anyone actually received theirs yet?

    Mine originally stated dispatch date would be 2nd for delivery 5th-6th.
    Was dispatched on the 1st, like yours, but on the Apple tracking page it has said expected delivery for the 2nd. Next day though it changed to "In transit to destination country - next updates expected in 4-5 business days".
    If I go to TNT (http://www.tnt.com/express/en_gb/site/home.html) and type the 9 digit number in the "Track International" box I get the following information:
    3 Jul 2010 09:13:28 Hong Kong Shipment In Transit.
    02 Jul 2010 17:00:00 Shenzhen Incorrect Transit Times In System, Possible Delivery Delay.
    02 Jul 2010 14:59:07 Hong Kong Shipment Received At Transit Point.
    02 Jul 2010 12:43:00 Shenzhen Shipment In Transit.
    02 Jul 2010 07:59:46 Shenzhen Shipment In Transit.
    02 Jul 2010 02:48:16 Shenzhen Shipment Collected From Sender.
    Still no idea though when it may arrive!
    Anyone know any more info?

  • Negative date

    How can I express/convert the date (for example) 02(d)-05(m)-1930(y) compared to 01-01-1970
    This is for birthdays for older people for example.
    it is clear that it must be a negative long value but, is there any (standart) programatic means by which I can calculate that?
    Thanks

    javaUserMuser wrote:
    How can I express/convert the date (for example) 02(d)-05(m)-1930(y) compared to 01-01-1970
    This is for birthdays for older people for example.
    it is clear that it must be a negative long value but, is there any (standart) programatic means by which I can calculate that?
    Thanks
    DateFormat formatter = new SimpleDateFormat("dd-MM-yyyy");
    Date grandsonBirthday = formatter.parse("15-05-1970");
    Date grandmaBirthday = formatter.parse("15-05-1920");
    System.out.println(grandmaBirthday.before(grandsonBirthday)); // this prints true%

  • Restricting Negative Data Entry on Planning Forms

    Hi All,
    We are developing a classic planning Application using Hyperion 11.1.2.2. We came across a scenario where we want to restrict end user from entering Negative Financial Values on certain cells.
    Any ideas on how can this be achieved?

    1. Validation rules is just a rule and it will still save the data to essbase
    2. As Jake Turrell said, custom Javascript is maintenance overhead and it will not work after 11.1.2.2+ as they are all ADF
    3. You can try checking on Maintaining triggers on the essbase database and can track them / send mails to respective users. (rounndabout process)
    4. Use a BR that will pickup all the members on form and you can apply a conditional check to see if the data is negative using IF statement and then assign it to #Missing. Since, you would be using only those members on the form, it would be quick.
    Regards
    Amarnath
    ORACLE | Essbase

  • Can I restore 1st generation data to 2nd generation iTouch?

    My teens 1st gen iTouch was stolen but good thing is a recent sync and backup is on her Mac so we have everything. I just got her a 2nd generation iTouch and before I do anything I wanted to ask as I know I can easily mess this up.
    When I hook it up for the first time and I assume it asks to restore or treat as new what should I do to ensure her purchased music and apps get put on her new iTouch?
    Thanks for helping an old guy out here to look good to save his daughters iPod data. :O)

    Thank you for the reply. I also found this: http://support.apple.com/kb/ht1414
    At the bottom of the article it has:
    Restoring your new iPhone, iPad, or iPod touch from a previous backup
    If you upgrade or otherwise replace your device with a newer device, you may be able to restore the previous backup to the new device. For upgrading from the original iPhone to iPhone 3G, see these instructions. You can upgrade one device with the backup from a different type of device; most settings will transfer to the new device.
    Note: During the process of restoring your old backup to a new device, you may see the iTunes progress bar pause. If this occurs, please allow for additional time for the upgrade to complete.
    I will try your suggestions and am sure all will be fine.

  • How to generate 3 payment due dates& 3 posting against single invoice?

    Hello Experts,
    Kindly provides some inputs on below requirement.
    For example :- In the Utility Bill,
    Consumption months: June, July, August
    Meter Reading taken in August
    Billing Months: September, October, November
    Bill generated in August
    Consumer receives the bill on September month
    Payment Due dates: 12 Sep 2009, 12 Oct 2009 and 12 Nov 2009
    Issues-:
    1.How to generate three posting against single invoice?
    2.How to generate three payment due dates for above postings in three consecutive months since payment due date logic is incremental in nature here, e.g.
    1st due date = posting date + 15 days
    2nd due date = 1st due date + 30 days
    3rd due date = 2nd due date + 30 days
    Requirement description:-
    The utility generates bill quarterly for domestic consumers. For such consumers, the utility takes reading from the consumers premises after end of consumption period (quarterly ) and generates bill on the 1st billing month (here 1st billing month is September).
    In the bill the utility divides total consumption into three parts (considering each part for each consumption month) and calculates all charge heads separately on each part. It however, consolidates and generates a single bill having three rows, each row showing charge heads of each consumption month and also net and gross amount to be given for each consumption month.
    Moreover, three postings have to be generated in FICA against that single bill. Also, it provides three due dates to the consumer, each date falling in each billing month, to pay the above three net amounts respectively. Dunning and other activities should be triggered if the consumer fails to pay the stipulated amount by corresponding due date.
    Looking forward for valuable suggestions
    Thanks in advance
    Regards,
    Vaseem
    Moderator note - question reposted - OP notified of violation Issue on quarterly bill
    Edited by: William Eastman on Jun 3, 2010 3:25 PM
    Edited by: William Eastman on Jun 3, 2010 5:01 PM

    Hello Experts,
    Kindly provides some inputs on below requirement.
    For example :- In the Utility Bill,
    Consumption months: June, July, August
    Meter Reading taken in August
    Billing Months: September, October, November
    Bill generated in August
    Consumer receives the bill on September month
    Payment Due dates: 12 Sep 2009, 12 Oct 2009 and 12 Nov 2009
    Issues-:
    1.How to generate three posting against single invoice?
    2.How to generate three payment due dates for above postings in three consecutive months since payment due date logic is incremental in nature here, e.g.
    1st due date = posting date + 15 days
    2nd due date = 1st due date + 30 days
    3rd due date = 2nd due date + 30 days
    Requirement description:-
    The utility generates bill quarterly for domestic consumers. For such consumers, the utility takes reading from the consumers premises after end of consumption period (quarterly ) and generates bill on the 1st billing month (here 1st billing month is September).
    In the bill the utility divides total consumption into three parts (considering each part for each consumption month) and calculates all charge heads separately on each part. It however, consolidates and generates a single bill having three rows, each row showing charge heads of each consumption month and also net and gross amount to be given for each consumption month.
    Moreover, three postings have to be generated in FICA against that single bill. Also, it provides three due dates to the consumer, each date falling in each billing month, to pay the above three net amounts respectively. Dunning and other activities should be triggered if the consumer fails to pay the stipulated amount by corresponding due date.
    Looking forward for valuable suggestions
    Thanks in advance
    Regards,
    Vaseem
    Moderator note - question reposted - OP notified of violation Issue on quarterly bill
    Edited by: William Eastman on Jun 3, 2010 3:25 PM
    Edited by: William Eastman on Jun 3, 2010 5:01 PM

  • Deleting Data from SSAS CUBE

    Hello Everyone,
    I have a question, we developed a Basic Cube by building dimensions & Fact from the Source table(Everything in DSV, no Physical DIM and Fact Tables). Now everything goes well.  The Source table will only have CUrrent day data.
    My Question is: Need to delete  particular day data from the cube without disturbing the Existing Data.
    Eg: When I process the data on 31st of March, cube will have only 31st. But when I process 1st , 2nd data CUbe should have 31st +2nd data. 1st Dated data should be deleted from cube,when ever I process the data I just need month end data need to be stored
    with current day data. all the other stuff should be deleted from the cube.
    if I process the Cube on 1st of May, I should only have 31st March, April 30th and May 1st data.
    Hope the Question is clear, please let me know.
    Any help/suggestions would be appreciated.
    Thanks In Advance.
    Thanks, Please Help People When they need..!!! Mark as answered if your problem is solved.

    Hi BKomm,
    I Guess the only way to handle this scenario is by using partitions.
    Create partitions for every last day of months + One additional partition for  current_date.
    your where clause for current_date partition should be somewhat like this
      Where Date = current_date And Date <> Last_Day_of_current_Month
    so that it does not duplicate data for the last day of current month.
    Saurabh Kamath
    Hello Kamat, I was looking for something else inorder to delete the existing data from a cube. But your Approach is far better than making it complex, it did not strike to my mind. Thanks will implement practically and check.
    Thanks Again.
    Thanks, Please Help People When they need..!!! Mark as answered if your problem is solved.

  • 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

  • Deleting data from a 2D array based on the id of the second column

    Hello
    I hope someone can help me. I have come across a hurdle in the programming of my application.
    1.
    I have a 2D array, the first column of this array contains my data and the second column contains an id, which is either 0 or 1.
    I have sorted this 2D array based on the id column so that the data corresponding to the 0’s is on top part of the array and the data corresponding to the 1’s follows it (on the bottom of the array).
    I want to delete that data (rows) of this sorted array that correspond to the 1’s and keep only the data (rows) that correspond to the 0’s.  
    So I would end up with a new 2D array that has only the data that I want on the first column and 0’s on the second column.
    I have hundreds of these 2D arrays resulting from my program (using a for loop) hence I want to automate this procedure. The length of the selected data arrays will vary.
    2.
    Once I can do this I will want to remove the id column (with the 0’s) from the 2D array and would like to build a new array with only the data from the first column (which may be of different length).
    So I want to end up with a 2D array with columns corresponding to the selected (1st column) data from the (original) 2D arrays. These data may be of different lengths so when building this new array I may need to do some padding. Will labview do this automatically?
    I hope that this is clear.
    Best wishes,

    Attached is a different approach - you don't need to do any sorting.
    The outer FOR loop assumes you have all the arrays available at once. If you are reading a file, modify it accordingly.
    You may or may not want the TRANSPOSE function on the final results, depending on what you want to do with it.
    Yes, when you assemble N-dimensional arrays into (N+1)-dimensional arrays, LabVIEW automatically pads for you.
    Enjoy.
    Steve Bird
    Culverson Software - Elegant software that is a pleasure to use.
    Culverson.com
    Blog for (mostly LabVIEW) programmers: Tips And Tricks
    Attachments:
    Extract Marked Data.vi ‏40 KB

  • 1st & last day of month based on month selected

    Hi All,
    I am an infant in BO. I want to create a variable in which I need to compare Order Creation Date with First Day of Month and Last Day of Month.
    I have gone through the posts here regarding this, I found huge no of posts on calculating the 1st & last day of month based on a date value. But,
    I don't have any date objects in the universe level, instead I have only Month Name/Month Number objects in the universe level (as it is a monthly report)
    So, How to create 1st day & last day of month based on the month selected.
    That is, If I run the report for FEB 2011 (Prompt values), I need the outputs as 01/02/2011 & 28/02/2011 as my 1st & last date values respectively.
    I am working on BOXI R 3.1
    Thanks in Advance,
    Mitch

    Hi
    Create a variables and write a formula like
    Also add Month number Object in query level
    Var_Month
    =userresponse("Enter Month")
    Var_A
    "01/"MonthNumberObj+Right(var_Month;4)
    var_First date
    Todate(var_A;"dd/MM/yyyy")
    var_lastdate
    =lastdayofmonth(var_Firstdate)
    Note: check the default format for date according to ur database like MM/dd/yy or something like that . and add in the var_firstdate
    regards
    Sunil

  • In V_V2 the role of Sort Item by date of creation and Sort by delivery date of earliest schedule line for the Sales Orders when Material is out of Stock.

    Hi All,
    Good Morning,
    I am working on once Incident for Re-Scheduling Program V_V2 where the user has requested us to change the criteria for determining the priority of Sales Document based on Sort Item by date of creation. Currently they are using the Sort by delivery date of earliest schedule line in the Variant.
    I would like to know the role these both options play in the Re-Scheduling program V_V2. I would like to know the impact of both of them and the kind of testing I need to perform to study the behaviour of Sales Orders especially when the material is out of stock?
    Please explain with help of examples.
    Thanks
    Farhan.

    This is not that simple that an example would explain how this transaction works but I'll give you some examples.
    Material A has SO1 and SO2 of 10KG each, stock is 20KG so both quantities are confirmed at today. A stock recount determines a reduction to 5KG. This program would change confirmed quantity of SO1 to 5KG and SO2 to 0KG if:
    Creation date of SO1 is older then SO2 in strategy 1
    1st delivery date of SO1 is smaller then SO2 in strategy 2
    Material B has SO1 and SO2 with 10KG each but no quantity confirmed, stock is 0KG. A prodution adds 15KG to stock. The program would change confirmed quantities of SO1 to 10KG and SO2 to 5KG if:
    Creation date of SO1 is older then SO2 in strategy 1
    1st delivery date of SO1 is smaller then SO2 in strategy 2
    I'm assuming a specific configuration, there are many other scenarios possible.
    regards,
    Edgar

  • Asset value date in case of multiple GRs

    Hello All,
    Could you please advise on the below issue.
    I have created PO with one line item for quantity of 5 for acquiring 5 Fixed assets. Created 5 GRs with different dates as mentioned below
    S.No. GR posting date Asset No.
    1 18.08.2009 190698
    2 28.08.2009 190699
    3 10.08.2009 190700
    4 06.08.2009 190701
    5 03.08.2009 190702
    In 1st asset capitalization taking 18.08.2009 which is Ok, for 2nd Asset also capitalization date taking as 18.08.2009 ( i.e. 1st GR date), for 3rd Asset capitalization date taking as 10.08.2009, for 4th Asset capitalization date taking as 06.08.2009 & for 5th Asset capitalization date taking as 03.08.2009. That means capitalization date it is taking as Oldest GR date. But essentially capitalization should pick from GR posting date (i.e.for 2nd asset it should take capilization date as 28.08.2009 instead of 18.08.2009).
    Could anybody has clue why system is picking 1st GRN date when I have posted 2nd Asset.
    Thanks a lot for your help in advance.
    Regards
    Srinivas

    Hello
    Please check the Document Date for the same
    Thanks
    Pramod

Maybe you are looking for

  • OBI11g intallation issue - Error in validating the port range for auto port

    I am using the intaller to install OBIEE 11g on my machine. When I get to step 6, I receive the error messages below. Currently I also have OBIEE 10g on my machine so the ports may be already used. Does any one know how I can resolve this issue? I pr

  • Pseudo Dynamic SQL

    I have a problem, in that I need to build up an SQL statement using boolean logic based on conditions. So I have variable which holds the SQL and then I need to execute it and store the results of it (One number (the result of a COUNT() ) ) in anothe

  • Deleting web gallery

    Is there anyway to delete a web gallery remotely? I am traveling and would like to delte several web galleries but I do not my laptop with me that was used to create them. Thanks

  • Relocating files based on creation date

    Hello, I have a folder full of hundreds of Video clips. I am interested in a script that will 1. look at the files sequentially 2. For each file read the creation date 3. If a Folder with that creation date does not exist, create a folder with that c

  • Error: Cannot open SharePoint Workspace. Try restarting your computer.

    Several of our Windows 7 SP1 workstations get the following message on Windows startup. The message simply reads: "SharePoint Workspace Error: Cannot open SharePoint Workspace. Try restarting your computer. Click here for more information." When you