Date/Time Field but not a date field type..

I am dealing with a table that was already created and filled/filling with data.. so don't have an option to have someone go back and fix.
The field i am dealing with is a varchar2 not a date field.
it has values like
12/31/1899
2/17/2010 10:00:00 AM
2/24/2010 9:00:00 AM
2/17/2010 8:30:00 AM
2/24/2010 9:00:00 AM
12/31/1899
Basically the 12/31/1899 dates are supplied the data source as an indicator that the real date/time is unknown until it gets updated later in the day or next day. (why its like this i don't know)
anyways.. I need to drop records that are 7 days old.
So for say the 2/17/2010 ones, when its 2/24/2010 when the process is ran, those records will get deleted but with the '12/31/1899' ones staying as they are awaiting to be given a date/time '12/31/1899' date is always used for the 'unknowns' so that is constant. The other 'valid ones' always have a date and a time given.
I've tried a few things today, but kept blowing up.
Edited by: CPSteven on Feb 11, 2010 6:04 PM

>
ORA-01830: date format picture ends before converting entire input string
With that command
The time in their messing with it?
>
You'd have that problem if the date format picture ends before any of your your strings end....
Eg.. your date field has "time component" and you just use... "DD-MON-YYYY" as the format picture.
However, If your format picture includes the maximum possible detail (of any of your strings) , you'll not see that error. Check this code below.
sql> select * from temp;
        ID DATE_STRING
         1 02/11/2010 03:10:26
         2 02/10/2010 03:10:26
         3 02/09/2010 03:10:26
         4 02/08/2010 03:10:26
         5 02/07/2010 03:10:26
         6 02/06/2010 03:10:26
         7 02/05/2010 03:10:26
         8 02/04/2010 03:10:26
         9 02/03/2010 03:10:26
        10 02/02/2010 03:10:26
        11 12/31/1899
        ID DATE_STRING
        12 12/31/1899
12 rows selected.
sql> delete from temp
  2  where date_string != '12/31/1899'
  3    and to_date(date_string,'MM/DD/YYYY') < (sysdate-7);
  and to_date(date_string,'MM/DD/YYYY') < (sysdate-7)
ERROR at line 3:
ORA-01830: date format picture ends before converting entire input string
sql> delete from temp
  2    where date_string != '12/31/1899'
  3      and to_date(date_string,'MM/DD/YYYY HH24:MI:SS') < (sysdate-7);
4 rows deleted.
----In your case.. your format mask would be to_date(date_string,'MM/DD/YYYY HH:MI:SS AM')

Similar Messages

  • Mandatory for Visable field but not for hidden field

    Hi All,
    I have a couple of radio buttons (Yes and No) when the user selects Yes they are then prompted for the date this happend.
    How can i make the Date field mandatory if they select yes but not if they select no. I have tried making the date field mandatory but it throughs the obvious error if it is hidden.

    Hi George, thanks for your reply.
    The way i hide and show the date box at the moment is by using the Show/Hide field action under the properties of the radio buttons.
    Thx

  • How to show attributes only in query panel but not in Add fields.

    Hi,
    Jdev - 11.1.1.7.0
    I have a requirement where I need to show attribute only in search panel but not in Add Fields list which is available in advanced section.
    Thanks for your time and help.
    Regards,
    Dileep.

    Hi,
    Is it really possible implement this kind of scenario, I could not find any property to disable the attribute only 'Add Fields' but not in query panel.
    Please some one confirm me this behavior.
    Thanks,
    Dileep.

  • Palm TX will sync but not transfer data after installing 64bit drivers for Windows 7

    Palm TX will sync but not transfer data after installing 64bit drivers for Windows 7 using the USB cable. Does anyone have any advise?
    Post relates to: HP TouchPad (WiFi)

    @MikeNTxs - 64bit USB drivers have been available since April of 2010, and they do work. I've synced successfully to my Vista64 bit laptop many times via USB.
    See the sticky thread at the top of this section titled "64bit Palm Desktop drivers are here!"
    WyreNut
    I am a Volunteer here, not employed by HP.
    You too can become an HP Expert! Details HERE!
    If my post has helped you, click the Kudos Thumbs up!
    If it solved your issue, Click the "Accept as Solution" button so others can benefit from the question you asked!

  • How do you know what the data usage was for and why?  It shows you date and usage but not the reason.

    How can you see what data usage was for on the bill?  It only shows the date and usage but not the reason for the usage.

    You can not see this info on VZW's site. There are apps for smartphones that will break down the info though, but by site or what was downloaded

  • Abnormal, Same query get data in sql but not working on Fron-end

    Dear,
    Version :Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
    We have created packed in oracle database befor two months ago & was working fine, but since morning select statment in package is not working while running via application which mentioned below and raise not data found but surprising thing is that same query is getting data when we execut on sql plus return one record.
    i don't know either it's abnormal behaviour or sth else becuase the same query run without changing any singl column in where_clause work in sql but not getting data while submition request through oracle application and raising not data found.
    --thankse
    Edited by: oracle0282 on Dec 29, 2011 2:20 AM

    Actully when i run this query in sql it return one record on the same parameter, while when we exeucte this select in pl/sql on the same parameter oracle raise no data found error.
    so i got confused the same query with same parameter retur record in sql but when we call it fron-end through packege raise 'no data found error'.
    hope you understand now.
    --thanks                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Node display off , Central data cache configured but not active

    Hi
    We get an error "Node display off , Central data cache configured but not active" in Central system while trying to display the monitored the abap instance of system.We just completed the CCMS configuration.
    we are getting this error in RZ20 (central system)
    Agent regristration is complete in monitored system and it is running fine.connection from central to monitored (abap instance) system is also ok.Please help asap.
    Operating System --AIX
    Sap version--ECC 6
    Database-db2
    Regards
    Shashi

    Hi,
    central data cache to improve the performance of the Alert Monitor when creating the alert monitoring trees.
    Check [This link|http://help.sap.com/saphelp_sm32/helpdata/en/de/13622d770b5e4f8398fc536b690e93/content.htm]
    And [This link|http://help.sap.com/saphelp_sm32/helpdata/en/10/75ea3b6d73e807e10000000a11402f/content.htm]
    Hope this solves your problem.
    Feel free to revert back.
    --Ragu

  • Node display off ,  Central data cache configured but not active while tryi

    Hi
    We get an error "Node display off ,  Central data cache configured but not active" in Central system while trying to display the monitored the abap instance of system.We just completed the CCMS configuration.
    Agent regristration is complete in monitored system and it is running fine.connection from central to monitored (abap instance) system is also ok.Please help asap.
    Operating System --AIX
    Sap version--ECC 6
    Database-db2
    Regards
    Chamba Shashi
    Edited by: SHASHI SAMAL on Apr 28, 2009 6:25 AM

    Hi,
    central data cache to improve the performance of the Alert Monitor when creating the alert monitoring trees.
    Check [This link|http://help.sap.com/saphelp_sm32/helpdata/en/de/13622d770b5e4f8398fc536b690e93/content.htm]
    And [This link|http://help.sap.com/saphelp_sm32/helpdata/en/10/75ea3b6d73e807e10000000a11402f/content.htm]
    Hope this solves your problem.
    Feel free to revert back.
    --Ragu

  • Central data cache configured but not active

    Hi,
    I am currently at a customer site and am configuring the solution manager system as a CEN.
    The sapccm4x en ccmsr agents have been registered and memory has been allocated in the CEN system for the central data cache, but whenever I open a monitor the following message is listed at the top of the screen:
    Central data cache configured but not active
    Suggestions on how to configure this cache and the impact of not doing so will be rewarded.
    Regards,
    Sander

    Hi,
    central data cache to improve the performance of the Alert Monitor when creating the alert monitoring trees.
    Check [This link|http://help.sap.com/saphelp_sm32/helpdata/en/de/13622d770b5e4f8398fc536b690e93/content.htm]
    And [This link|http://help.sap.com/saphelp_sm32/helpdata/en/10/75ea3b6d73e807e10000000a11402f/content.htm]
    Hope this solves your problem.
    Feel free to revert back.
    --Ragu

  • On a west Texas highway I believe my old 3G iphone could get data with 3 bars. My new 4S could make phone calls but not get data. An att guy told me it's because there aren't enough 4G towers yet. Other explanations?

    On a west Texas highway I believe my old 3G iphone could get data with 3 bars. My new 4S could make phone calls but not get data. An att guy told me it's because there aren't enough 4G towers yet. Other explanations?

    Simple solution. Get a real internet service and not a cell phone internet connection service it was never meant to be used as the primary internet service
    And how do you lose a home and job and be sued as you claim. What over 10 Gb of data? Give me a break
    In my city small claims is $5000.00
    And over that amount you can go to a superior court to have your issue settled.
    http://www.bbb.org
    Good Luck, Elector

  • Would like to set events to repeat monthly on my calendar - but not by date.  Would like to repeat on 1st Monday or 2nd Wednesday, etc.  Possible?

    Would like to repeat events monthly on calendar,  but not by date.  Would like to repeat on 1st Monday of each month, 2nd Wednesday of each month, etc.  Possible?

    Use iCal on your Mac to configure custom repeats and then sync to your iPod.  The Mac iCal allows almost infinite choices.

  • Retrieve date, time, guid and user id data from IP u2013wrong mapping of fields

    Hi
    I have used the How to guide Line Items in BI Integrated Planning to implement the functionality to save the username, guid, date and time of who is planning. I do not get any errors but the field 0uname is empty and the guid field gets the username of the planner (0uname). The date and time field get populated correctly. Why does the fieldu2019s username and guid populated incorrectly? Do I have to change the code (I just copied the code from the How to document)? To me the abap code looks correct.
    We use BI 7.0 and SPS 17.
    Kind regards
    Erik

    Try this: Just replace the objects for ...LOGD = date, ...LOGT = time and ...LOGU = User:
    FIELD-SYMBOLS:  <l_chavl> TYPE ANY,
                    <l_curk> TYPE ANY.
    ASSIGN COMPONENT '/BIC/M2PLOGD' OF STRUCTURE c_s_chas to <l_chavl>.
    <l_chavl> = sy-datlo.
    ASSIGN COMPONENT '/BIC/M2PLOGT' OF STRUCTURE c_s_chas to <l_chavl>.
    <l_chavl> = sy-timlo.
    ASSIGN COMPONENT '/BIC/M2PLOGU' OF STRUCTURE c_s_chas to <l_chavl>.
    <l_chavl> = sy-uname.
    Regards,
    Andreas

  • Adobe Livecycle Designer 7.0 - Text fields are not returning data on email submission-Help?

    Hello - I am using Livecycle Designer 7.0 and have created a form with different fields to be filled out and submitted via email back to me using the standard submit by email button.
    However, when the form is filled out and returned all the control field choices from both the checkboxes and the radio buttons are there - but nothing from the textbox fields is returned in the email submission. Those fields are not being returned.
    also - once they are returned how do I ensure they will repopulate via the import data into the form functionality?

    This forum is for the Adobe FormsCentral (formscentral.adobe.com) which is a service that allows you to create, collect and analyze data using an online web form. You should ask Designer related form questions in the Designer forums: http://forums.adobe.com/community/livecycle/livecycle_es/livecycle_designer_es
    I'll move your post to that forum so you don't need to retype it. They can help you out...
    Randy

  • Vrkme field is not fetching data

    Hello friends,
    I am fetching the data from vbrk table and vbrp table using join on vbeln field.
    but in vrkme field only 'CS' is coming but I had checked in vbrp table there is other data also based on join conditions.
    i used query:
    select amatnr abukrs avbeln bvrkme from ( vbrk as a inner join vbrp as b
    on avbeln = bvbeln ) into corresponding fields of table itab
    where  a~bukrs in s_bukrs.
    here s_bukrs is selection screen field.
    when I am checking vrkme field details in debugger then only 'CS' is coming but I had checked in database table
    other data also exists.
    why it is so? Please help me.

    It could be that the non-u201CCSu201D entries that you see in VBRP are for documents that are not in the sales organization of your selection.
    Recommend adding vbeln to your selection screen and logic.  Then get the vbeln of a VBRP record that you found (where VRKME <> CS) and run your query for that vbeln.  Should give you an idea of whatu2019s going on.
    By the way, u201Camatnru201D should be u201Cbmatnru201D in your select statement.  u201Cvbrk as au201D  does not contain the field matnr.  It must be correct in your code otherwise you would get a syntax error or no data at all.
    Regards,
    Ken

  • How to use dates/times in the definition of local fields?

    Hello!
    I have few tough questions for which I haven't found an answer. I hope someone is capable to help me.
    1. Is there a transaction to search tables if we know the field?
    2. I'd like to define a local field and need to use dates in the calculation function. So basically I need to calculate the lean-time from the date of the purchase order (field BSTDK) to the date of the final delivery (field PLIFTS) and the result should be displayed in weeks. How can I do this? Or can I?
    3. Can I use the local fields further in my calculations?
    Thank you in advance!
    Maria Kangasniemi

    Hi,
    1. Is there a transaction to search tables if we know the field?
    Tcode:    SE84
    2. I'd like to define a local field and need to use dates in the calculation function. So basically I need to calculate the lean-time from the date of the purchase order (field BSTDK) to the date of the final delivery (field PLIFTS) and the result should be displayed in weeks. How can I do this? Or can I?
    Doing some calculation you can define it.
    3. Can I use the local fields further in my calculations?
    What is local Fields?

Maybe you are looking for

  • Jobs not appearing in printer logs

    I have a G4 Xserve running Tiger server. It is running a print server, where most of the clients are booting with accounts on a G5 Xserve. The login data is shared via LDAP between the two machines. This seems to work as expected, so far. The G4 prin

  • Safari 5 cannot run on windows XP pro

    I am a bit confused about this problem. Reading some topics I saw that solution for my problem could be to delete or move "safari" folder from C:\Documents and Settings\user name\Application Data\Apple Computer. But this doesn't work for me. Also I t

  • Exclude list for Protected mode Reader X?

    Is there a way to exclude emails with attachments from a specific domain from being opened in protected mode? For instance, opening an attachment sent from someone in the same coporate environment?

  • Unable to open PDF files with acroread

    Hi, We have a solaris 9 server with acroread installed on the server. When I log in to the server with any local user (root or any other user) I'm able to open the PDF files which are locally on the server as well the PDF files which are on NFS Share

  • Insert Image Error

    When I hit Ctrl+Alt+I to insert an image, or go to Insert > Image, I get the following message: ERROR While executing objectTag in Image.htm, a JavaScript error occurred. I cannot find any information about this anywhere online. Any suggestions?