Obtain registration with the date max - rank question

I use the statement below to get rank for records with the same data with max date. But I still see rank 1. Someone help me understand this?

SELECT T.*,
       RANK() OVER(PARTITION BY T.UNIQUEID ORDER BY T.LOADDATE DESC) RNK
  FROM DEMO_TBL T
 ORDER BY T.STARTTIME ASC

create table DEMO_TBL
(
  NUMBERID  VARCHAR2(50),
  STARTTIME DATE,
  STOPTIME  DATE,
  TOTAL     NUMBER(19,10),
  UNIQUEID  NUMBER(10),
  LOADDATE  DATE
);




insert into DEMO_TBL (NUMBERID, STARTTIME, STOPTIME, TOTAL, UNIQUEID, LOADDATE)
values ('11110008524705', to_date('01-07-2013', 'dd-mm-yyyy'), to_date('01-07-2013 23:59:59', 'dd-mm-yyyy hh24:mi:ss'), 705.0000000000, 15353856, to_date('06-07-2013 12:58:57', 'dd-mm-yyyy hh24:mi:ss'));


insert into DEMO_TBL (NUMBERID, STARTTIME, STOPTIME, TOTAL, UNIQUEID, LOADDATE)
values ('11110008524705', to_date('02-07-2013', 'dd-mm-yyyy'), to_date('02-07-2013 23:59:59', 'dd-mm-yyyy hh24:mi:ss'), 698.9950000000, 15353857, to_date('06-07-2013 12:57:08', 'dd-mm-yyyy hh24:mi:ss'));


insert into DEMO_TBL (NUMBERID, STARTTIME, STOPTIME, TOTAL, UNIQUEID, LOADDATE)
values ('11110008524705', to_date('03-07-2013', 'dd-mm-yyyy'), to_date('03-07-2013 23:59:59', 'dd-mm-yyyy hh24:mi:ss'), 701.9970000000, 15353855, to_date('07-07-2013 12:58:17', 'dd-mm-yyyy hh24:mi:ss'));


insert into DEMO_TBL (NUMBERID, STARTTIME, STOPTIME, TOTAL, UNIQUEID, LOADDATE)
values ('11110008524705', to_date('04-07-2013', 'dd-mm-yyyy'), to_date('04-07-2013 23:59:59', 'dd-mm-yyyy hh24:mi:ss'), 91.0020000000, 15353854, to_date('08-07-2013 13:00:07', 'dd-mm-yyyy hh24:mi:ss'));


insert into DEMO_TBL (NUMBERID, STARTTIME, STOPTIME, TOTAL, UNIQUEID, LOADDATE)
values ('11110008524705', to_date('05-07-2013', 'dd-mm-yyyy'), to_date('05-07-2013 23:59:59', 'dd-mm-yyyy hh24:mi:ss'), 90.9970000000, 15353853, to_date('09-07-2013 12:59:35', 'dd-mm-yyyy hh24:mi:ss'));


insert into DEMO_TBL (NUMBERID, STARTTIME, STOPTIME, TOTAL, UNIQUEID, LOADDATE)
values ('11110008524705', to_date('06-07-2013', 'dd-mm-yyyy'), to_date('06-07-2013 23:59:59', 'dd-mm-yyyy hh24:mi:ss'), 91.0060000000, 15353852, to_date('10-07-2013 12:56:36', 'dd-mm-yyyy hh24:mi:ss'));


insert into DEMO_TBL (NUMBERID, STARTTIME, STOPTIME, TOTAL, UNIQUEID, LOADDATE)
values ('11110008524705', to_date('07-07-2013', 'dd-mm-yyyy'), to_date('07-07-2013 23:59:59', 'dd-mm-yyyy hh24:mi:ss'), 91.0020000000, 15353851, to_date('11-07-2013 13:02:47', 'dd-mm-yyyy hh24:mi:ss'));


insert into DEMO_TBL (NUMBERID, STARTTIME, STOPTIME, TOTAL, UNIQUEID, LOADDATE)
values ('11110008524705', to_date('08-07-2013', 'dd-mm-yyyy'), to_date('08-07-2013 23:59:59', 'dd-mm-yyyy hh24:mi:ss'), 91.0010000000, 15353847, to_date('14-07-2013 13:01:26', 'dd-mm-yyyy hh24:mi:ss'));


insert into DEMO_TBL (NUMBERID, STARTTIME, STOPTIME, TOTAL, UNIQUEID, LOADDATE)
values ('11110008524705', to_date('08-07-2013', 'dd-mm-yyyy'), to_date('08-07-2013 23:59:59', 'dd-mm-yyyy hh24:mi:ss'), 91.0010000000, 15353850, to_date('12-07-2013 12:55:28', 'dd-mm-yyyy hh24:mi:ss'));


insert into DEMO_TBL (NUMBERID, STARTTIME, STOPTIME, TOTAL, UNIQUEID, LOADDATE)
values ('11110008524705', to_date('09-07-2013', 'dd-mm-yyyy'), to_date('09-07-2013 23:59:59', 'dd-mm-yyyy hh24:mi:ss'), 1015.4440000000, 15353842, to_date('23-07-2013 12:59:34', 'dd-mm-yyyy hh24:mi:ss'));


insert into DEMO_TBL (NUMBERID, STARTTIME, STOPTIME, TOTAL, UNIQUEID, LOADDATE)
values ('11110008524705', to_date('09-07-2013', 'dd-mm-yyyy'), to_date('09-07-2013 23:59:59', 'dd-mm-yyyy hh24:mi:ss'), 91.0000000000, 15353849, to_date('14-07-2013 12:56:59', 'dd-mm-yyyy hh24:mi:ss'));


insert into DEMO_TBL (NUMBERID, STARTTIME, STOPTIME, TOTAL, UNIQUEID, LOADDATE)
values ('11110008524705', to_date('10-07-2013', 'dd-mm-yyyy'), to_date('10-07-2013 23:59:59', 'dd-mm-yyyy hh24:mi:ss'), 91.0040000000, 15353848, to_date('14-07-2013 12:59:13', 'dd-mm-yyyy hh24:mi:ss'));


insert into DEMO_TBL (NUMBERID, STARTTIME, STOPTIME, TOTAL, UNIQUEID, LOADDATE)
values ('11110008524705', to_date('10-07-2013', 'dd-mm-yyyy'), to_date('10-07-2013 23:59:59', 'dd-mm-yyyy hh24:mi:ss'), 1023.9450000000, 15353844, to_date('23-07-2013 12:59:02', 'dd-mm-yyyy hh24:mi:ss'));


insert into DEMO_TBL (NUMBERID, STARTTIME, STOPTIME, TOTAL, UNIQUEID, LOADDATE)
values ('11110008524705', to_date('11-07-2013', 'dd-mm-yyyy'), to_date('11-07-2013 23:59:59', 'dd-mm-yyyy hh24:mi:ss'), 92.0010000000, 15353846, to_date('15-07-2013 12:57:14', 'dd-mm-yyyy hh24:mi:ss'));


insert into DEMO_TBL (NUMBERID, STARTTIME, STOPTIME, TOTAL, UNIQUEID, LOADDATE)
values ('11110008524705', to_date('11-07-2013', 'dd-mm-yyyy'), to_date('11-07-2013 23:59:59', 'dd-mm-yyyy hh24:mi:ss'), 1019.0510000000, 15353841, to_date('23-07-2013 13:01:24', 'dd-mm-yyyy hh24:mi:ss'));


insert into DEMO_TBL (NUMBERID, STARTTIME, STOPTIME, TOTAL, UNIQUEID, LOADDATE)
values ('11110008524705', to_date('12-07-2013', 'dd-mm-yyyy'), to_date('12-07-2013 23:59:59', 'dd-mm-yyyy hh24:mi:ss'), 1042.8390000000, 15353843, to_date('23-07-2013 12:59:34', 'dd-mm-yyyy hh24:mi:ss'));


insert into DEMO_TBL (NUMBERID, STARTTIME, STOPTIME, TOTAL, UNIQUEID, LOADDATE)
values ('11110008524705', to_date('12-07-2013', 'dd-mm-yyyy'), to_date('12-07-2013 23:59:59', 'dd-mm-yyyy hh24:mi:ss'), 91.9940000000, 15353845, to_date('16-07-2013 12:58:28', 'dd-mm-yyyy hh24:mi:ss'));

you are looking to do this,

SELECT T.*,
max(t.starttime) OVER(PARTITION BY NUMBERID,STARTTIME,STOPTIME,TOTAL ORDER BY T.LOADDATE DESC) mx_strt_dt,
max(t.stoptime) OVER(PARTITION BY NUMBERID,STARTTIME,STOPTIME,TOTAL ORDER BY T.LOADDATE DESC) mx_stop_dt

FROM DEMO_TBL T
ORDER BY T.STARTTIME ASC

Tags: Database

Similar Questions

  • Difficulty in obtaining registration with the last moment!


    Hello

    I you are trying to join two tables and terms just to get the record with the highest timestamp!

    I already wrote this but do not know how should I include the RANK to get the last?

    Select i.isin, i.id, i.mkt, i.tm, o.obst, row_number () on)

    rank of partition by order of i.tm desc i.id)

    of instrument_info i, orderbookstate o

    where i.id = o.id

    and i.mkt = o.mkt

    ------------------ 

    CREATE TABLE ORDERBOOKSTATE

    ( ID             VARCHAR2(33 BYTE) NOT NULL,

    MKT           VARCHAR2(11 BYTE) NOT NULL, 

    OBST         NUMBER(2),

    TIME_INSERTED VARCHAR2()20 BYTE)

    );

    CREATE TABLE INSTRUMENT_INFO

    (

    ISIN VARCHAR2 (13 BYTE) NOT NULL,

    ID VARCHAR2 (33 BYTE),

    VARCHAR2 (20 BYTE) TM,

    MKT VARCHAR2 (11 BYTE) NOT NULL,

    NUMBER (10),.

    CTL VARCHAR2 (4 BYTE)

    );

    insert into INSTRUMENT_INFO (ISIN, ID, TM, MKT, ITY, CTL)

    values ('SE0001535568', 'LLSW-B','2013-03-11 06:55:11 ', 'SSEFN', 0, 'SEK')

    insert into INSTRUMENT_INFO (ISIN, ID, TM, MKT, ITY, CTL)

    values ('SE0005126125', 'LLSW-B','2013-11-08 06:57:20 ', 'SSEFN', 0, 'SEK')

    insert into ORDERBOOKSTATE (id, mkt, obst, time_inserted)

    values ('LLSW-B', 'SSEFN', 4,'2013 - 11 - 08 12:37:27 ');

    When I add the rank = 1, it returns me an error!

    Do you know how should I join them to get just the last?

    Need any more made Hotel me know!

    Thanks in advance!

    Select * from

    (

    Select i.isin, i.id, i.mkt, i.tm, o.obst, row_number () on)

    rank of partition by order of i.tm desc i.id)

    of instrument_info i, orderbookstate o

    where i.id = o.id

    and i.mkt = o.mkt

    )

    where rank = 1

  • Obtain registration with the maximum Date within a group

    People,
    Need to find the file that has the most recent date. Here's what the table looks like:
    desc student_ldg;
    
    account_number   not null   varchar2(10)
    dept_code        not null   varchar2(5)
    assignment_date  not null   date
    We had to find the last record in the table that has the largest assignment_date.

    Any help is appreciated.

    Thank you

    Which version of DB you are working on?

    Try this

    select *
      from (select * From student_ldg order by assignment_date desc)
     where rownum = 1;
    
  • Problem with the Date Max filter in the mapping

    Hello

    I tried to put a filter on my mapping as mentioned below: -.

    TABLE_SOURCE. DATE > (SELECT NVL (MAX (DATE),'' 01-JAN-1900) OF TARGET_TABLE)

    I get the below mentioned, error in ODI 12 c performance: -.

    Aggregate expression is in the filter, but no aggregate expression in the select list of the query for target: TARGET_TABLE

    All I'm doing is making sure we receive only new records from the source. When I remove the NVL of the query, it works!

    Please help me solve the problem.

    Thank you and best regards,

    PV

    Hello

    Write your Condition of filter in this way:

    SRC_DATE > NVL ((select max (TRG_DATE) in TARGET_TABLE), January 1, 1900 "")



  • outer join while selecting the date max

    Hello
    Oracle 11g R2.

    I want to build a query that joins outside between 2 related tables, but selects only the date max if more than 1 record returned for a given customer. Here are the tables I and some records.

    create table customer (NumCli number, name varchar2 (100))
    create table orders (ordnum number, NumCli number, date orddate)

    insert into customers values (1, 'ABC')
    insert into customer values (2, 'DEF')
    insert into customer values (3, 'ABC')
    insert into customer values (4, 'DEF')

    insert into orders values (1, 1, sysdate)
    insert into orders values (2, 1, sysdate + 1)
    insert into orders values (3, 2, sysdate + 2)

    I created the following query, but it returns the two dates for NumCli = 1. I want to display the name of the client no matter if he has a prescription. But if there is more order, I want display the folder with the date max.

    Select a.custnum, b.SID, b.orddate
    client a, b of orders
    where a.custnum = b.custnum (+)
    and b.orddate (+) < = sysdate + 10 - additional criteria as part of the edition

    It is a simplified example of a more complex query, that I am trying to solve. If possible, could you please suggestion a request without the use of analytical functions or inline views?
    Thank you!!

    Published by: arizona9952 on April 4, 2013 22:05

    arizona9952 wrote:
    Thanks Jac. Any way to do this without a group of?

    Is there a particular reason not to use MAX?

    It will be difficult to find a maximum date without a group of... If it's ok for you to have everything available, you can use the correlated sub query...

    select a.custnum, a.name,
             (
               select b.orddate
               from   orders b
               where b.custnum = a.custnum
               and b.orddate <= sysdate + 10
               and rownum = 1 ) ordddate
    from customer a
    
  • How to make a list of question field with the data type DATE?

    I have a column with the DATE data type. Using forms 6i I want to generate a poplist field of list item with this column while the value of the items in the list of names of days like SATURDAY, SUNDAY, MONDAY. If we change the date to a char data type, it won't work properly, but now with the data type DATE behind him, it gives the following error message

    "FRM-32082: invalid value for given the type of element."
    List WEEKREST
    Article: WEEKREST
    Block: EMPRESTS
    Form: module 3
    FRM-30085: unable to adapt to the shape for the release. »


    Using forms 6i how a list item field type DATE data which may contain names of days?

    Set your date as a hidden field (not shown) column. Create your item list with the names of day of varchar2. Create the list item as a base table field that accepts the values of text in the names of the days. On this area, create a when-validate-item trigger that translated the text into an actual date that it then uses to set the value of the real object of the base table.

  • Measures with the date Conference

    Hello

    I have to make an application, as part of my end of study project, which allows to calculate heat flow. Pour this, I have data measured with thermocouples. These data are stored on a data recorder that record these data on a .txt, .xls or .csv file (it is to be chosen by user).

    I'm not very chiseled with LabVIEW.

    In a Prime Minister, I tried to read the .txt file data. I can read the 1st line as I wish but not others.

    So I decided to work with a .xls file. The temperatures Conference goes smoothly. For time is the date, it's more complicated. Indeed, I would like to USE date and time corresponding to each measure to plot a graph XY with the date and time X and Y the temperature of the thermocouple.

    Kind regards

    Here's an example (VI from LV2011 but attached VI en LV2010) made on the basis of your code. Comment by watch it extract the news date and time of the string and generate the the from graph XY time in seconds in X. realized very quickly, it is without doubt room for improvement but you will serve as a basis for work at least.

    To define 'Structure box' serving at first as far as being 0 and calculate relative time to the following samples. Thus the x-axis of the graph starts at 0.

    My time is short, I renounce other comments but I happy to answer specific questions.

  • Problems with the data connection

    Hello
    I bought a Z3 Compact Xperia on December 10, 2014. I live in Italy and I use Vodafone as my everyday.
    I got a SIM card replacement nano with LtE capabilities just to get the phone in the new fast network. The problem I encounter is that, since on January 13, 2015, I had some problems with the data in mode 3 G connection.
    So far, I used my phone normally, then I tried to send a text message with WhatsApp and phone stuck with the clock icon in the lower corner of the bubble of the message. I thought it was a temporary network problem but I'm not sure about this.
    I live in a small town where the coverage is really good, either in 3G and LTE. I tend to use the 3G because it uses less battery and it does not affect my 4G data plan.
    Th issue, it's that if I do a speedtest when I feel that network glitch I have a ping, but with very good download speeds up to 2000ms.
    The problem is that I believe that this is not a network problem because my mother has a phone HtC One S and runs vodafone without problem even when I'm having the glitch.
    I tried to reset the phone to factory settings, but it did not help.
    In LTE / 4G I do not experience this issue. In fact, I think if there is problem need a phone related software because the antenna works very well.
    If it doesn't I'll try to contact ad Vodsfone then I'll send my phone for the helpdesk if Vodafone tell me that the question is not on their network.

    Thanks in advance for your help.
    Simone

    It's pretty strange, double check the APN settings and contact EE in this regard.

  • What happens with the data on ROW as soon as they are storage migrated to VMDK?

    Hi all

    The following scenario: I have a virtual machine with virtual RDM. I have storage migration online, selection of thick discs so convert the VMDK RDM. The question is: what is actually happening with the data on the LUN that was RDMs, once the migration is complete?

    I expect that the data are still there, and if needed, I can remove the VMDK and re - attach the new LUNS as RDM.. But I can't find any official information on this.

    I am not mistaken? Y at - there somewhere that says clearly what is happening with the data?

    Thank you!

    Your wait is quite correct. The data on the raw LUN will not get affected once it is converted to a virtual machine. Only the mapping of RDM file is deleted and the LUN becomes available, and you can use card or again as an RDM or to create a VMFS data on that store.

    André

  • Need help with the data storage store, local array and network connections

    Need help with my ESXi 4.1 installation

    My hardware:

    I built a server with an Asus P6T whitebox, i7 920, 12 Gig RAM, NIC, Intel Pro1000 PT Quad, 3ware 9650SE-12ML with 8 1.5 TB SATA green in a raid 6 array gives me about 8 + TB with a spare drive all housed within a NORCO RPC-4220 4U Rackmount Server chassis.  I also have a 500 GB SATA drive which will hold the ESXi and virtual machines.

    The network includes a firewall, Netgear Prosafe FVS336G, GS724Tv of Netgear ProSafe 24 port Gigabit Managed Switch on a dhcp cable modem internet service provider.

    I also have 2 old NetGear SC101T NAS disks (4to) I want to connect to the system how some - at a later date have... data on them and want to transfer to the new storage array. I always looking into the question of whether they will work with ESXi 4.1, or I might have to only access it through Windows XP.

    My Situation:

    I have already installed ESXi 4.1 and vsphere client with no problems and it is connected to a dhcp cable internet service.  I've set up host via a dynamic DNS service name give me a static hostname on the internet.  I installed three machines to virtual OS successfully at the moment and now want to first start by creating a multimedia storage server which will use some of this new 8 TB array, then separate data storage for use with a web server small overhead storage and a backup.  It is a domestic installation.

    Help with the data store and network:

    I was doing some reading, because I'm new to this, and it looks like I'll probably want to set up my table via ESXi as a nfs disk format.  Now, the data store is usually in another physical box from what I understand, but I put my readers and ESXi all in the same box.  I'm not sure that the best way to put in place with grouped network cards, but I want to make this work.

    I understand that in ESXi 4.1 using iSCSi LUN must be less than 2 TB, but nfs - I should be able to add a bigger partition then 2 TB (for my multimedia) in nfs, right? or should I still add it separately as a separate 2 TB drives and then extend them to get the biggest space.

    Any suggestions or direct resources showing examples on how to actually add some parts of the table as data warehouses separate nfs.  I know that to go to the configuration tab, and then select Add to storage, and then select nfs. I have not my picture, but it's here that I don't know what to do because ESXi 4.1 system already has an address, should I put the same thing to the new data store array also (will it work?), and what should I use for the name of the folder and the store of data... just do something to the top.  I thought to later install Openfiler (for a multimedia storage using this table server) as a virtual machine, use the table with esxi so that I can access the same storage space with widows and linux-based systems.

    I also know I have to find a way to better use my quad nic card... put in place of virtual switches, grouping, etc HELP?

    Any direction, assistance, similar facilities to sample, suggestions or resources that would help would be great. I did a lot of hunting, but still a little confused on how to best to put in place.

    You must think of VMDK files of large databases with records of random size guest go read some data (a DLL or an INI file), maybe write some data back, then go read other data. Some files are tiny, but certain DLLs are several megabytes. It's random i/o all and heavy on the search time. IO Opsys is small random operations that are often sequential (go read data, write data, go read other data,...) so that deadlines are critical to the overall performance. That's why people say OPS are / s of reference and forget the MBs flow. The only time where you bulk transfers are when you read media (ISO files).

    Well, now forget all this. Actually the disk activity will depend on the specific applications (database? mail server? machines compiler?), but the above is true for boots, and whenever applications are idle. You should see the profile to know.

    RAID 10 is faster (and often more reliable) than RAID 5 or RAID-6 except in certain specific cases. In General RAID 10 is ideal for many random writes, since the calculation of parity for RAID-5 and - 6 adds to the overall latency between command and response - latency is cumulative if a little slow here and a little slow it adds up to a lot of overall slow synchronous especially with e/s on a network. OTOH RAID-5 and -6 can produce faster readings due to the number of heads, so you can use it for virtual machines that transfer bulk. Test. You may find that you need several different types subdashboards for best results.

    You said 3ware, they have some good grades on their site, but don't believe it. With my 9650 that I found myself with only a couple of their recommendations-, I put the (simple) table for allocation size 256 k, nr_requests at 2 x the queue_depth and use the planner date limit. I had the habit for the Ext4 file system formatted with stride and stripe-width synced to the table and used the options large_files with fewer inodes (do not use the huge_files option unless you plan to have single VMDK files in the terabyte range). Use a cache of great reading in advance.

    Virtual machines use VMDK files in all cases except raw iSCSI LUN that they treat native disks. VMDK is easier to manage - you can make a backup by copying the file, you can move it to a PC and load it into another flavour of VMware, etc. There could be some features iSCSI to your San as a transparent migration but nothing for me. NFS has less chatter of Protocol if latency lower times to complete an operation. NFS is good to read and write a block of data, that's all it boils down to.

    UPS is good, but it won't help if something inside the machine explodes (UPS does nothing if the PC power supply goes down). If the RAID card has an option for a battery backup module, so it can contain some writings in memory and may end up the disk i/o after replacing the power supply. 3ware also limits the types of caching available if help is not installed, and you get just the right numbers with the module.

  • Comparing converted text until then with the Date column

    I have a question where I need out of a text column in a date format and then compare this column against another column in the same table, which is already to date format. I tried to use a sub query to avoid doing this in two steps, but get a:

    "ORA-01858' a non-digit character was found here where was waiting for digital"

    error message that obviously has something to do with the date formatting in the subquery: the types do not match.

    Note: clock_num is a text column and contains the numbers are supposed to be dates like 070111 - where the need for conversion to a date type to match the stat_date which is the type of date column. I have no control over the data in this column. It is not my picture, is the picture of the society and I have to use!

    So my question is what syntax/function should I use to get the type of expression clock_nbr the type of eff_date.

    Or y at - it another way to do the same thing without using subquery?

    Any help is appreciated...

    SELECT
    me. SSN,
    Of
    member_enroll me
    WHERE me.ssn = '999999999'
    AND me.stat_date <
    (SELECT to_date (substr (me.clock_num, 1, 2) |)) » /' || substr (me.clock_num, 3, 2) | '/' || substr(me.clock_num,5,2), 'mm-DD-yy') as clock_nbr
    OF member_enroll me
    WHERE me.ssn = '999999999')

    I have no experience with PL/SQL Developer. Any chance you could launch SQL * more and copy / paste of a session where you run this code?

    You should only run the DDL to create the function once. If the second query runs, you have managed to successfully create the function. My hypothesis is that whatever 'window SQL' you are talking about and what you mean by 'run' is the cause only the function must be created. Most of the IDEs have a function to execute current SQL statement, without taking into account other statements that can be registered in the same window, and a separate function to execute all instructions in the current window. Different iDEs have different requirements to separate several SQL statements if you want to run all of the SQL statements in a window. You may need to do something like the added statement a / after the CREATE FUNCTION as a separator.

    Justin

  • Compare a date with the date system

    Hello

    I use the script (that I found in this forum) in below in order to obtain a date of datefield1, add a year and give the date of datefield2.

    It works very well.

    Kai var = util.scand ("yyyy-mm-dd", this.rawValue);
    var sFullYear = oDate.getFullYear ();
    var sMonth = oDate.getMonth ();
    sDate var = oDate.getDate ();
    Datefield2.FormattedValue = util.printd ("JJ", new Date ((sFullYear+1), sMonth, sDate));
    Datefield2.RawValue = Datefield2.formattedvalue;

    But now I would compare the new date (David [added a year]) with the date current system (cDate).

    Does anyone have an idea how to compare dates? The result should change color as below.

    If (David < cDate) {}
    Datefield2.fontcolor = "255,0,0";
    }

    Thank you very much.

    Kind regards

    ra_be

    Try to use the Date of Javascript object:

    var myDate = new Date();
    myDate.setFullYear (2010,0,14);
    var today = new Date();

    If (myDate > today)
    {
    Alert ("the date is before January 14, 2010");
    }
    on the other
    {
    Alert ("today, it is after January 14, 2010");
    }

    If this does not work, try the analysis on the month, day and year, and then do a comparison on all of them (without forgetting to convert strings of months an integer. For example if you store the release date: February 2, 2009, February goes to 2).

    Then your comparison would look like:

    if(myYear == sysYear) {}

    if(myMonth == sysMonth) {}

    if(myDay == sysDay) {}

    days are equal

    }

    Else if (myDay<>

    myDay is before sysDay
    }

    else {}

    myDay is after sysDay

    }

    }

    }

    essentially to follow this same logic for comparisons of month and year and it should work as well.  It would be certainly cleaner and much easier using this Date however (http://www.w3schools.com/jsref/jsref_obj_date.asp)

  • Need help with the function MAX Returns the values

    I am creating a report to return slow movement inventory data. One of the requests is that it return only the last date that an item is traded on. A map shows the last date of receipt for a part, the other will show the last time, a part has been issued or shipped on a sales order.

    The hiccup is that it returns every single of the last time that an item has been received, so every last show of the material (on the second sheet) of items on-site.

    Could someone help me set the max value? As shown below, and many variations, the sheet comes up with no corrupt data or dates.

    MAX (Date of the MAX operation) (PARTITION OF matter Transactions.Item matter Transactions.Item ORDER)

    Always returns the next two when in reality, I want just the one with the date the most recent (April 2010).

    100034 BNDSCE-105 - QUALITY BEARINGS OR EQUIVALENT A400M AB01D...     Problem of component WIP $0.00 11-Sep-2009-3
    100034 BNDSCE-105 - QUALITY BEARINGS OR EQUIVALENT A400M AD01D...     Problem of component WIP $0.00 April 13, 2010-16

    Thank you for your help.

    Becka

    Hi Becka
    If you have a new calculated column showng, as in your example, 13 April 10, and you have another column that contains also this date, you should be able to create a new condition. Condition that must be the date calculated max is equal to the actual date, thus returning only the line that includes 13 April 10.

    I hope I'm makng sense

    Best wishes
    Michael

  • See the time with the date in the cell?

    How do you not see time with the date in a cell? I tried all the settings I can find but without success.

    Using the numbers from version 3.6.2 (2577) - OS: El Cap 10.11.6

    I don't want to see that 12:00:00 AM

    Hi Russ,

    Inspector to format > cell, the parameters as shown below:

    Kind regards

    Barry

  • Print an e-mail with the date of the transmission

    Hi, I need to print an email I wrote to send as proof, but when I do that it shows the date of printing, NOT the date it was originally mailed. Is there a way to fix this? I hope that you can help us as soon as POSSIBLE! Thank you, Annie.

    anniesol said

    Hi, I need to print an email I wrote to send as proof, but when I do that it shows the date of printing, NOT the date it was originally mailed. Is there a way to fix this? I hope that you can help us as soon as POSSIBLE! Thank you, Annie.

    Problem is now solved! Choose the print option 'other measures' dropdown list allows email to be printed with the date of the shipment.

Maybe you are looking for

  • Lets say I got a $10 gift card balance and I want to buy something will be only charged debit card 10 cause of $20 s $ of the balance of the gift card?

    Lets say I got a $10 gift card balance and I want to buy something will be only charged debit card 10 cause of $20 s $ of the balance of the gift card?

  • Disable animation for the new tab

    In the new FF 4.x, when I click to open a new tab, the new tab slides open (it is animated). How can I disable this option and have it just plain and simple?

  • Rocket video format?

    I'm trying to convert my own personal DVDs directly to Fuze-ready using DVD HD Decrypter files.  I don't want to use the Sansa Media Converter.  I want to be able to convert all the .vobs a big .avi in one step. Can you please give us more informatio

  • How do I Setup Screen Saver

    Original title: how I do  How do I?  When I enter the settings for the display, I find the control panel and stuff, but how do, smile, screensaver cute to be the new paper aquarium wallpaper. When I put in the help how can I get the screensaver to be

  • Tile Windows 8 mail

    I setup outlook acct and am able to send and receive e-mail, but not mail of tiles on the home page.  How to enable the tile of mail on the screen to show me when I have mail.  Very frustrating to have to connect to outlook.com to see if I have mail.