Help with pulling records for the last 24 hours

Post Author: kbrinton
CA Forum: Formula
Hi,
I don't know what is wrong with me but I can not figure out how to get Crystal to pull records for the last 24 hours.  I have a date field I can key off of but I can not figure out the formula or correct syntax to put in the Selection formula.  Any help would be great!!  Thanks

Post Author: SKodidine
CA Forum: Formula
No need to create any formula.  In your record selection criteria type:
{table.date} in dateadd("h",-24,currentdatetime) to currentdatetime
If you just want the prior 24hrs and do not care about the time then replace 'currentdatetime' with 'currentdate'.
(currentdatetime - 24) will give you 24 days before and not 24 hours.

Similar Messages

  • Hi, I have just tried to update the iPhone software and it appears to be updating but the screen on my phone has had the same picture of the apple and its at the same spot of loading (about 3 quarters) for the last HOUR!! help!

    Hi, I have just tried to update the iPhone software and it appears to be updating but the screen on my phone has had the same picture of the apple and its at the same spot of loading (about 3 quarters) for the last HOUR!! help!

    oh and the device is not being recognised by itunes now either.

  • HT1438 I did a master reset on my iphone4 the apple sign poped up and now for the last hour there is just a spinning icon as if something's loading

    I did a master reset on my iphone4 the apple sign poped up and now for the last hour there is just a spinning icon as if something's loading helpp

    DFU Mode Restore
    Open iTunes on computer. Connect iPhone to computer with USB Cable. Then hold both home and power buttons for exactly 10 seconds, then release the Power button, keep holding the Home button until iTunes recognizes iPhone in Recovery Mode. Usually about 20 seconds of holding Home button. If the screen is black this is DFU Mode. Then click Restore button of iTunes.

  • I am a newbie to labview but have delt with plc's for the last 10 years. I would like to send and recieve certain integer, floating poin

    t, or binary files through the plc or micrologix communication port. This would allow me to build a front panel and change certain states of bits or retrieve data from certain files to display on the front panel. Please steer me in the right direction...I am a newbie to labview but have delt with plc's for the last 10 years. I would like to send and recieve certain integer, floating point, or binary files through the plc or micrologix communication port. This would allow me to build a front panel and change certain states of bits or retrieve data from certain files to display on the front panel. Please steer me in the right dir
    ection...

    t, or binary files through the plc or micrologix communication port. This would allow me to build a front panel and change certain states of bits or retrieve data from certain files to display on the front panel. Please steer me in the right direction...Another option is to talk to the PLC using Modbus. Several versions of Modbus drivers are available online--or I could send you the ones I use.
    The big thing to look at is exactly what you want to do in the end. If you are going to be able to use all the features of the DSC, by all means go for it. It will save you a lot of time.
    If however, all you want is a remote front panel for the PLC, the DSC might be overkill. Only you can say.
    Look at your entire application and where you can see your work going in the reasonable future.
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • Min,Max for a time Range and Sum of Records for the last date/time

    Hi All,
    I have a table with the following structure/data:
    create table  Events   (
                                        [EventID]       
    int                   NOT NULL,
                                        [Title]            
    nvarchar(200)  NOT NULL,
                                        [SourceName]  nvarchar(20)    NOT NULL,
                                        [Type]             
    int                  NOT NULL,
                                        [eDate]           
    datetime
    insert into Events values(100, 'Event 1', 'S01', 3,'2014-01-01 00:00:00.000')
    insert into Events values(100, 'Event 1', 'S07', 3,'2014-01-01 00:00:00.000')
    insert into Events values(100, 'Event 1', 'S08', 3,'2014-01-01 00:00:00.000')
    insert into Events values(100, 'Event 1', 'S09', 3,'2014-01-01 00:00:00.000')
    insert into Events values(101, 'Event 2', 'S010', 3,'2014-01-01 00:00:00.000')
    insert into Events values(102, 'Event 3', 'S03', 3,'2014-01-01 00:00:00.000')
    insert into Events values(100, 'Event 1', 'S04', 3,'2014-01-01 00:00:00.000')
    insert into Events values(101, 'Event 2', 'S05', 3,'2014-01-01 00:00:00.000')
    insert into Events values(102, 'Event 3', 'S06', 3,'2014-01-01 00:00:00.000')
    insert into Events values(100, 'Event 1', 'S01', 3,'2014-02-01 00:00:00.000')
    insert into Events values(101, 'Event 2', 'S02', 3,'2014-02-01 00:00:00.000')
    insert into Events values(102, 'Event 3', 'S03', 3,'2014-02-01 00:00:00.000')
    insert into Events values(100, 'Event 1', 'S04', 3,'2014-02-01 00:00:00.000')
    insert into Events values(101, 'Event 2', 'S05', 3,'2014-02-01 00:00:00.000')
    insert into Events values(102, 'Event 3', 'S06', 3,'2014-02-01 00:00:00.000')
    insert into Events values(100, 'Event 1', 'S01', 3,'2014-03-01 00:00:00.000')
    insert into Events values(101, 'Event 2', 'S02', 3,'2014-03-01 00:00:00.000')
    insert into Events values(102, 'Event 3', 'S03', 3,'2014-03-01 00:00:00.000')
    insert into Events values(100, 'Event 1', 'S04', 3,'2014-03-01 00:00:00.000')
    insert into Events values(101, 'Event 2', 'S05', 3,'2014-03-01 00:00:00.000')
    insert into Events values(102, 'Event 3', 'S06', 3,'2014-03-01 00:00:00.000')
    And I wrote the following query:
     select EventID as [Event ID],
           Title, 
           count(distinct(SourceName)) as [Instances], 
           Type,
           min(eDate) as  [First Detected],
           max(eDate) as [Last Detected],
           datediff(d,min(eDate),max(eDate)) as [Delta (days)]
    from  Events
    where type = 3
    group by EventID, Title, Type
    having max(eDate) <> min(eDate)
       and max(eDate) =(select top 1 eDate from Events order by eDate desc)
    and I get the following results (see the instance number)
    Event ID Title         Instances Type First Detected                      Last Detected                    
       Delta (days)
    =============================================================================================================================
    100         Event 1         5         3    2014-01-01 00:00:00.000     2014-03-01 00:00:00.000    
    59
    101         Event 2        
    3         3    2014-01-01 00:00:00.000     2014-03-01 00:00:00.000     59
    102         Event 3        
    2         3    2014-01-01 00:00:00.000     2014-03-01 00:00:00.000     59
    This is normal for this query however what I need to do is a little different.
    In other words, while I need to show when we recorded a specific event first and last time,
    I need to display the results for the last date/time when it was recorded. 
    For example what I need to provide should look like this:
    Event ID  Title                Instances        Type       First Detected                    
    Last Detected                          Delta (days)
    =============================================================================================================================
    100         Event 1            2                   3           
    2014-01-01 00:00:00.000     2014-03-01 00:00:00.000      59
    101         Event 2            2                   3           
    2014-01-01 00:00:00.000     2014-03-01 00:00:00.000      59
    102         Event 3           
    2                   3            2014-01-01 00:00:00.000     2014-03-01 00:00:00.000     
    59
    Could you please help me to fix this query?
    TIA,
    John

    ;With cte As
    (Select EventID as [Event ID],
    Title,
    SourceName,
    Type,
    min(eDate) Over(Partition By EventID, Title, Type) as [First Detected],
    max(eDate) Over(Partition By EventID, Title, Type) as [Last Detected],
    eDate,
    datediff(d,min(eDate) Over(Partition By EventID, Title, Type),max(eDate) Over(Partition By EventID, Title, Type)) as [Delta (days)],
    max(eDate) Over() As MaxEDate
    from Events
    where type = 3)
    Select [Event ID],
    Title,
    COUNT(Distinct SourceName) As Instances,
    Type,
    [First Detected],
    [Last Detected],
    [Delta (days)]
    From cte
    Where eDate = MaxEDate And [First Detected] <> [Last Detected]
    Group By [Event ID],
    Title,
    Type,
    [First Detected],
    [Last Detected],
    [Delta (days)];
    Tom
    P.S. Thanks for providing the DDL and data.  That is always very helpful.

  • Need Help with instr/Regexp for the query

    Hi Oracle Folks
    I am using Oracle
    Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    I have some student responses and the valid values are +/-/O(alphabet)/P and spaces at the end of the sting only not in the middle.
    As per my requirement the record number 2 3,4 should be listed from the query but I am getting only one (record 3).
    Can we use REG_EXP
    Please help.
    Thanks in advance.
    Rajesh
    with x as (
    SELECT '+-+-POPPPPPP   ' STUDENT_RESPONSE, 1 record_number FROM DUAL union all
    SELECT '+--AOPPPPPP++' STUDENT_RESPONSE, 2 record_number FROM DUAL union all
    SELECT '+-+-  OPPPPPP--' STUDENT_RESPONSE, 3 record_number FROM DUAL union all
    SELECT '+-+-9OPPPPPP   ' STUDENT_RESPONSE, 4 record_number FROM DUAL )
    (SELECT RECORD_NUMBER,
    TRIM(STUDENT_RESPONSE) FROM X
    WHERE
    ((INSTR (UPPER(TRIM(STUDENT_RESPONSE)),'-') =0)
    OR (INSTR (UPPER(TRIM(STUDENT_RESPONSE)),'+') =0)
    OR (INSTR (UPPER(TRIM(STUDENT_RESPONSE)),'O') =0)
    OR (INSTR (UPPER(TRIM(STUDENT_RESPONSE)),'P') =0)
    OR (INSTR (UPPER(TRIM(STUDENT_RESPONSE)),' ') !=0)
    )

    Hi, Rajesh,
    Rb2000rb65 wrote:
    Hi Oracle Folks
    I am using Oracle
    Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing optionsThanks for posting this (and the WITH clause for the sample data). That's very helpful.
    I have some student responses and the valid values are +/-/O(alphabet)/P and spaces at the end of the sting only not in the middle.Are you combining the responses to several qeustions in one VARCHAR2 column? It might be better to have a separate row for each question.
    As per my requirement the record number 2 3,4 should be listed from the query but I am getting only one (record 3). What exactly is your requirement? Are you trying to find the rows where student_response contains any of the forbidden characters, or where it contains a space anywhere but at the end of the string?
    Can we use REG_EXPYes, but it's easy enough, and probably more efficient, to not use regular expressions in this case:
    Here's one way:
    SELECT     record_number
    ,     student_response
    FROM     x
    WHERE     TRANSLATE ( UPPER ( RTRIM (student_response, ' '))
                , 'X+-OP'
                , 'X'
                )     IS NOT NULL
    ;That is, once you remove trailing spaces and all occurrences of '+', '-', 'O' or 'P', then only the forbidden characters are left, and you want to select the row if there are any of those.
    If you really, really want to use a regular expression:
    SELECT     record_number
    ,     student_response
    FROM     x
    WHERE     REGEXP_LIKE ( RTRIM (student_response)
                  , '[^-+OP]'          -- or '[^+OP-]', but not '[^+-OP]'.  Discuss amongst yourselves
                  , 'i'
    ;but, I repeat, this will probably be slower than the first solution, using TRANSLATE.
    Edited by: Frank Kulash on Oct 17, 2011 1:05 PM
    Edited by: Frank Kulash on Oct 17, 2011 1:41 PM
    The following is slightly simpler than TRANSLATE:
    SELECT     record_number
    ,     student_response
    FROM     x
    WHERE     RTRIM ( UPPER ( RTRIM (student_response, ' '))
               , '+-OP'
               )          IS NOT NULL
    ;

  • Help with transparent background for the pop up menu!

    Hello everyone,
    I am working on a Web site which has a pop up menu created in Dreamweaver 8. The pop up is over a picture and I'm thinking about to make its background transparent. I'm not really a programmer to be able to do it manually but I'm familiar with JS. Would anybody be able to help me with this? I truly appreciate it.
    I could find the code but don't know where to place it! The JS file is about 700 lines!!! I'm so confused...Below is the source file for the JS that you could download...
    http://www.arxcustomhomes.com/mm_menu.js
    Thanks so much.
    Mojan

    Sure.
    http://www.arxcustomhomes.com
    Thanks a lot.
    Mojan

  • Help with port forwarding for the WRT54G

    I need assistance please!
    I am having issues trying to setup port forwarding for a ftp. I already have set this up for a SQL Server port and it works remotely. When I setup another rule for ftp using port range 20-21 it does not work.
    I have confirmed that I have saved my settings, have the correct IP address, etc. I have firmware version 4.21.1 and not sure how to troubleshoot this. Any help would be great.
    Thanks,
    John

    Yes you do need to have the port already forwarded for port 20~21 with both TCP/IP and UDP enabled unless you know for sure your ftp only uses just one of them.  That is why I asked what port your SGL was set to.  Follow the link that other guy posted and open port 20 and 21 (I only use 21 with no problems) and make sure it is directed to the IP of the ftp host.  Also that PC needs to have the FTP enabled in windows.  To do that go to your control panel > add/remove software > and on the left side go to add/remove windows components.  Then check the box for the ftp and add it.  It should ask for your windows CD do have it handy when you add the ftp component to your PC.
    Richard Aichner (Ikester)

  • Need help with installing Windows for the bar exam

    I need to retake the bar exam in Feb 2011 and I've decided to switch to typing. I am trying to figure out what Windows I need (the software says XP is fine but is that even available anymore)- so can someone walk me through this process? I've partioned my hard drive with the default 5GB but should it be more?
    I'm looking at buying Windows- is XP okay or should I shell out for 7-i.e. is one more compatible with Macs?
    And then finally, in the installation instructions they mention that I need my Mac OS disc for the process- is that the snow leopard disc or something else? My discs are in storage right now so should I wait until I get them before starting this process or can I get replacements if I accidentally threw them out in moving?
    Sorry for all the questions, but well, I'm racing to get everything done and I want to make sure I don't crash my system halfway through the exam!

    You don't need Boot Camp, but even XP will have a lot of stuff to update from after the install, and that takes temp space. Just as your Mac shows 5-10GB there is add'l hidden space used.
    Apple's 'requirements' has gotten others in trouble and I was pretty sure it was more like 10GB. Plus a lot of XP discs are now SP3.
    XP out of the box but connected to the net is just waiting for malware, average is 15 minutes to be infected. 7 is better and just in case you need it again.
    System Builder can come in 32 or 64-bit but XP is 32-bit only.
    VirtualBox by Oracle is a free VM.
    1GB for one program actually seems like a lot, or is that RAM requirement?

  • Help with downloading Ringtones for the 8830

    Went to Verizon, couldn't download my ringtones.
    Went to the User's Manual, told me to click on media, all ring tones, press menu button, then download tunes... problem is, there is no download tunes menu item.
    Any help somebody could give me would be greatly appreciated.
    Doug
    Chandler, Arizona
    www.TheDirtDealers.com

    Verizon is noted for blocking a number of standard features in the handheld OS.  I verified the steps you gave as correct on my BB, but I have a different carrier.  Suspect you may need to take it up with Verizon, or, if this is a company issued device, they may have requested Verizon to block it.
    You can also download tunes by browsing to a website that offers sound clips.  When you click on the link it should offer to save it as a ringtone for you.  Try www.freeringtones.com, but any site that offers short .mp3 or .mid clips should work.
    posted by DigitalFrog
    WARNING: May contain traces of nuts.

  • I need help with exporting project for the web

    Probably something i am doing wron g but here are the problems. When I use Quicktime Converter, if I try to convert to a Quicktime movie or an MPEG-4 nothing happens and i get a 'File error;File Unknown message' when i try to convert to an AVI File, it works, but even though I have already rendered the project, it shows up with little flashes of blue that say 'unrendered'. and finally, when I try to make it a w
    Windows Media File, it stops after 29 seconds. Any ideas?
    I have an iMac with dual core processor, and FCE HD 3.5.1. I have my video files on an external drive.
    iMac   Mac OS X (10.4.10)  

    perform a search using the term export for web and it should throw up some ideas.
    here's one for starters:
    http://discussions.apple.com/thread.jspa?messageID=2309121&#2309121
    If you're using flip4mac to convert to wmv, the trial stops at 30 seconds - you need at least wmvstudio to export to wmv:
    http://www.flip4mac.com/wmv.htm

  • I purchased an album from itune, it's downloading the 5th of 7 songs and its stuck there for the last hour or so. how do i solve this. internet connection is good

    HELP. i just purchased a couple of albums from itunes. It's downloading but got stuck on the 5th song of album 1. internet connection's good. it says that the file being loaded is an MPEG-4 audiofile. what could be the problem? what can i do about it? can i skip this particular file to download the rest?

    If you're stuck on the part of the process where it says "Processing File" you're not alone.
    I downloaded an entire album, and two songs were stuck on "processing file".
    I'm pretty sure it's a problem on their end.
    What's worse is that I couldn't even restart my computer normally - I had to hold down the power button for 5 seconds and force shut down everything.

  • I have been having problems with my FaceTime for the last few weeks. Up to then I was able to use it daily and then it suddenly stopped functioning. I have 4 friends in the same situation. Is there a problem centrally with Apple? Anyone else with problems

    I have been using FaceTime regularly over the past year or so and suddenly it has stopped working. It seems to dial up and says its connecting and then just switches off. I have a number of other friends who are also having problems with this and also on their iPhones. Does anyone have an answer to this problem?

    Make sure all parties are running IOS 7.1.1
    http://support.apple.com/kb/TS5419

  • Have been using FaceTime for long time with same person, for the last two weeks when trying to connect, we get connection failed message, something change in settings that we should look at?

    Now getting FaceTime failed message when trying to connect with a person that were connecting successfully with up unto two weeks ago, has something changed?

    Take a look around you here in this forum. Many people are talking about having problems using FaceTime. A few users claim to have contacted Apple and Apple says that they are aware of an issue with FaceTime and that they are working on it.
    Some users claim that upgrading to iOS 7 solved there problem with FaceTime. Take a look around the forum and read some of the other discussions.

  • HT2731 Help I have just spent the last hour trying to reset my Ipod 4thG  email and password... I do not know what I am doing wrong??

    I did this threw my computer... I just can not get into my ipod...

    Hello wilo6
    Check out the first article to reset your Apple ID password. The second article is for if you forgot the passcode for your iPod touch to get it back working again.
    Apple ID: If you forget your password
    http://support.apple.com/kb/HT5787
    iOS: Forgotten passcode or device disabled after entering wrong passcode
    http://support.apple.com/kb/ht1212
    Thanks for using Apple Support Communities.
    Regards,
    -Norm G.

Maybe you are looking for

  • How Do You View PHP in DW and Safari with a MAMP Server?

    It almost works! I have just installed and set up MAMP. I haven't made a MySQL database and user account yet, (I'm not sure if it will make any difference if I do) but I followed the instructions - http://www.adobe.com/devnet/dreamweaver/articles/set

  • Contract update with reference to an order

    Hello everybody, I'm trying to find a way to update the contract value released (AWERT field in RV45A structure) when an additional order is created with reference to an existing one. Thank you in advance. Mike Edited by: Michael Papadakis on Dec 22,

  • Example of an OO ALV that reflects changes from an editable column...

    Hello Experts, I am currently developing a report wherein I need to add the value entered by the user to another column. For example, Column A is editable and the user entered the value 100 in a given cell. I need to add that value(100) to column B.

  • Will not read D800 NEF files

    Lightroom will not read Nikon D800 NEF files.  I have updated lightroom twice,  first to 4.1 and second to 4.2 and in neither case would the files import.  I have read several forum entries that say these files are compatible with Lightroom and/or to

  • How to preserve custom page numbers when combining PDF's?

    When combining multiple PDF's into one, the custom page numbers are lost. Example: As four separate files (one page each), the pages are numbered as follows:  AC-77, AC-78, AC-79, AC-80.  When combining them into a single PDF, the page numbers become