Date format(for number fields)

Hi there.
I'm creating some sql queries wich will be executed by some users throught the Oracle client PL/SQL, and I need to format some fields in date format.
Those fields are NUMBER(8) and they are in that format: "YYYYMMDD"
The format I want to put that information is: "DD.MM.YYYY".
What's the easiest way to do that?
The version that I'm using is Oracle 9.2.0.4.0.
Thanks by the way.

Hi,
Use TO_CHAR to convert the number to a string,
use TO_DATE to convert the string to a date, then
use TO_CHAR to format the date.
TO_CHAR ( TO_DATE ( TO_CHAR ( numeric_column
                            , 'fm00000000'
                  , 'YYYYMMDD'
        , 'DD.MM.YYYY'
        )This shows why storing dates in some other kind of column is a bad idea.

Similar Messages

  • Invalid date format for 'Created' field in the getVersions web service Response.

    Hi all,
    I am trying to get all versions for selected document by calling getVersions method Versions.asmxweb service, but getting ‘Created’ date attribute value is in the format "29-05-2012 12:01"
    but I am expecting either one of the following date formats.
     1.      yyyy-MM-dd HH:mm:ss  or  yyyy-MM-ddTHH:mm:ssz
     2.      MM/dd/yyyy HH:mm a   (a means AM/PM)
     3.      MM/dd/yyyy
     4.      yyyyMMdd HH:mm:ss
    where do I need to change?
    what are all the formate will be support by SharePoint?
    please find attached response xml of getVersions call.
    <results xmlns="http://schemas.microsoft.com/sharepoint/soap/">
        <list id="{6A6F6CD1-2E9C-44CC-B1F5-56G7JB5C8778}"/>
        <versioning enabled="1"/>
        <settings url="http://hbngjfgj47s20/reg/_layouts/LstSetng.aspx?List={7S6F6CD1-2E9C-44CC-B1F5-KO9J8Y7Y6H78}"/>
        <result version="@0.3" url="http://vmesxsrv47s20/register/Shared Documents/Parent/child/my_doc" created="29-05-2012 12:01" createdRaw="2014-12-02T12:46:02Z" createdBy="my_dom\agi_sharepoint"
    createdByName="AGI_Sharepoint" size="288" comments=""/>
        <result version="0.1" url="http://hbngjfgj47s20/register/_vti_history/1/Shared Documents/Parent/child/my_doc" created="29-05-2012 10:01" createdRaw="2014-12-02T10:55:18Z" createdBy="my_dom\my_sharepoint"
    createdByName="my_sharepoint" size="288" comments=""/>
        <result version="0.2" url="http://hbngjfgj47s20/register/_vti_history/2/Shared Documents/Parent/child/my_doc.txt" created="29-05-2012 11:01" createdRaw="2014-12-02T10:59:25Z" createdBy="my_dom\my_sharepoint"
    createdByName="my_sharepoint" size="288" comments=""/>
    </results>
    Kindly help me on this.

    Hi,
    According to your post, my understanding is that you want to change date format for ‘Created’ field in the getVersions web service.
    Per my knowledge, you can get the date format for ‘Created’ field as “MM/dd/yyyy HH:mm a”.
    For more information, you can refer to:
    Versions.GetVersions Method (Versions)
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • How to format large number field in XML so that it appears as is in Excel

    Hi
    I need help in formating the number field so that the number displays completely in Excel.
    Ex: 12345678889453 and this appers in Excel as 1.23457E+13
    Please let me know if you have any idea on this.
    Thanks

    Hi friends,
    Thanks to all of you that you all have replied my question and given your answers.
    Thanks to all of you specially Alpana Phapale, Wallie Chang, Poonam Thorat and Raghavendra Gadhamsetty, the answers given by you is the perfect one may be in different ways and only one can be used by me. But your answers were exactly correct.
    Thanks to Asha Lund, your answers is also correct but the result as per my report should be in figures and not in words.
    Whatever it may be but for repling thanks to you too.
    Please be always with me, I am very new to Crystal Report and just learnt by my own as my Boss ordered me to do this and I have to make about 50 reports within 15 days. I think the day will start from today.
    Well friends thanks a lot again for all your effort.

  • Date formats for SQL statements used by recordset object

    Hi,
    Date formatting appears to be quite problematic for Business One.  I did a forum search for date issues and I don't think I saw any of them with an "answered" status.  I have an issue with formatting a date for the creation of an SQL statement that the DI sends to SQL Server 2005.  I need to format a date so that the localization parameters don't matter for either the client machine or SQL Server's machine.  We don't have a problem as long as our machines are localized as USA.
    I have PL 22 and I have a form - ours - where I use the Today() function to fill a date field.  So this is a date that is not entered by the user.  The result of this function is consistent with the localization parameters on my machine.  We have two other date fields on the form where the user must type in the date. 
    As a test, I changed my machine to the UK parameters.  I then set up the language parameters of Business One for English(United Kingdom).  I changed the date format specifications in Business One so that its format is dd/mm/yy.  I then brought up the form and the field that is formatted by the above function arrived in the form's field as dd/mm/yy.  I then typed in the two other dates in the same format and added the record to the database.  The form's table is user-defined. 
    I dismissed the form then brought it back up loaded with the new record.  The date that was entered by the function appeared in USA format (mm/dd/yy).  The dates that were typed in appeared in the Business One format (dd/mm/yy).  This of course is not consistent.
    When I looked at what got into the database, the formats were the opposite.  Weird!  To make matters really confusing, I run an SQL statement within SQL Server Mgt Studio, and use the WHERE clause to filter on the date that was based on the function.  It didn’t matter what format I used for the WHERE clause, the record came up.  Does anyone have any idea about how I can ensure that I always use the correct date format for SQL statements passed by Business One to SQL Server regardless of where in the world the application is being run?
    Thanks,
    Mike

    Ian,
    Here's what I'm concerned about:  I’m using the date in a “WHERE” clause.
    Assume the date is Aug 3, 2007.
    "SELECT * FROM Table WHERE StartDate > ‘8/3/2007’"
    OR
    "SELECT * FROM Table WHERE StartDate > ‘3/8/2007’"
    If the client machine is set up as USA, the today function will provide the date as formatted in the first query.  If the database server is setup as let’s say the UK, I believe that SQL Server query parser will interpret the date as Mar 8, 2007.
    If the client machine is set up as UK, the today function will provide the date as formatted in the second query.  If the database server is setup as let’s say USA, I believe that SQL Server query parser will also interpret the date as Mar 8, 2007.
    In both cases it would be wrong.
    I know I could use the DATEPART function to get the three parts and this will make the code indifferent to the localization specs of the client machine.  I need to then be able to concatenate those date parts for the “WHERE” clause so that the localization specifications of the database server don’t matter.
    Thanks,
    Mike

  • To accept all date formats for variables

    Hi,
    I am getting a vadidation message on refresh of a query on entering European date format in the selection criteria "Please enter value in permitted format for variable XXXX"
    I need date to accept all date formats for variables to execute query.
    Currently US date format has been accomodated, On entering European date format i get the above validation message.
    Please suggest how do i supress this validation message or any other thoughts on the same.
    If anyone experienced the same before or applied any notes plz send the SAP Note number for the same. I am currently on BW 3.5.
    Message was edited by:
            tyson m

    tyson,
    why dont you control the date display through the user creation / user details option - then your date entries should sort themselves out.
    Arun

  • Where does one manage date formats for display and input

    the user specification is that dates be displayed as YYYY-MON-DD. Is there a config or properties file which contains the date format for display? Is there a calendar drop-down that can be positioned next to a date input field for a question on a screen?
    Thanks,
    Allan

    Hi Allan,
    Curious why the rule project wasn't created with "English (Canada)" initially? If your project is English (UK) with the default configurations for that locale, then I assume your currency values are appearing in OWD with the GBP symbol (£) instead of a dollar sign ($)?
    As for the impact of switching… I highly recommend getting confirmation from the OPA Dev team before doing it, but in the meantime, if you wanted to experiment on your own with a separate test rulebase (as opposed to whatever formal rulebase you're working on), here are my observations from an initial look… (FYI, I'm an experienced OPA rulie, but I'm non-technical and not in the Dev team, so best to check with them!)
    I poked around the language parser files and saw that English (UK) has an English (UK) verb list, whereas English (Canada) uses the English (US) verb list. The vast majority of verbs are identical in all the variations of English, however, there are a couple which differ. So if you've used any verbs which have a different spelling between the 2 lists, there may be some attribute text to tweak, e.g.
    - English (UK): the person travelled to Australia
    - English (US): the person traveled to Australia
    - English (UK): the person cancelled the reservation
    - English (US): the person canceled the reservation
    I saw some other different files between English (Canada) vs English (UK), but didn't notice anything in them which I'd expect to impact the rulebase.
    As for how it might impact other components:
    * screens file and the properties file – May be some tweaking depending on how you addressed the verb spelling issue above.
    * regression test files – May be some tweaking depending on how you addressed the verb spelling issue above.
    * messages.(locale).properties – The default messages.(locale).properties file appears to be based on the Language setting of the Project. I just tested this and OWD used a different messages.(locale).properties file when I changed the Project Language (OPM | File menu | Project Properties | Common Properties | General | Language).
    * Siebel Connector – don't know what the impact would be.
    OPA Dev team – Can you review what I've said here? And add any relevant further detail?
    Cheers,
    Jasmine

  • CalendarUI element showing different date format for different locations

    Hi,
    I have an input field with date calendar in my webdynpro Java form . User can select date from this calendar and fill the input field. For this I have used input field  in my layout and have binded this with one context attribute of type date. Say name of this field is requiredByDate
    Now when I build and deploy my code, I can see the the required By date field and user is able to select date values from the calendar button next to the input field. The format of the date selected is mm/dd/yyyy.
    However , when a user tests this application from other location say Malaysia, for him the format is coming as dd/mm/yyyy after selecting the date from the calendar.
    Just want to know ,is there is difference in date format for differnt locations ? For India, when you select the date its showing mm/dd/yyyy and for Malayisa its showing dd/mm/yyyy.
    Is there anything we can do by changing our system settings like timezone or dateformat in system settings.
    I am using standard UI element and binding it with context element of type date.
    Need your advice or help on this..
    Thanks and regards,
    Sai

    Hi,
    go to
    [http://help.sap.com/saphelp_nw04/helpdata/en/f4/d95664da179b4db731e21c2e470b72/frameset.htm|http://help.sap.com/saphelp_nw04/helpdata/en/f4/d95664da179b4db731e21c2e470b72/frameset.htm]
    It describes the fallback sequence followed by the Web Dynpro for Java Runtime in order to determine the current session locale.
    Regards
    Matteo

  • What is this error java.sql.SQLException: Bad format for number ?

    Dear All,
    I am reading few values from database. Then I get this error "MyError:Error : java.sql.SQLException: Bad format for number 'Sarawak' in column 6. " So what is this error referring to. I have checked the database column and its value fits according the data type. Any hints please?

    I have checked the database column and its value fits according the data type.Check again. Then check again. Keep checking until you find your error. You are trying to read a string containing "Sarawak" as a number. You have "getInt(6)" or other numeric type, and the 6th column in the select statement is not numeric.

  • OBIEE Presentation Services : Default formatting for numeric fields

    Hello all.
    I need help in setting default formatting for numeric fields in criteria. If a user adds an numeric field, it does not have any formatting associated with it. I want to know how do you set default formatting (for example if user adds sales measure it should appear in default format like $1,000 or even with decimal places).
    Please help.
    Thank you.

    Hi,
    1) We have so many subject areas. If we select "system wide default for this data type", is this change going to reflect in all subject areas.No should do this subject area wise.
    2) Will this effect if we migrate from dev to prod environment.Yes it will effect.
    I hope u will follow this to-
    http://forums.oracle.com/forums/ann.jspa?annID=939 :)
    Regards,
    Srikanth

  • BOXI3.0 How to choose certain data format from selected field?

    Hello there!
    Its been a while since my last post the question.
    I have one question.
    I have this PO_ID field. Example of the data:
    1. 72998
    2. FF15376
    3. 71794R
    4. WSSC 092008/0004
    5. WC/ 092008/0290
    6. MP20080911-1187
    There are a lot of style or non fix data format inside PO_ID field.
    My question is how can I choose only PO_ID type no.1 (72998) only show in the webi?
    Filtering is one way but what about formula or variable or any other method?
    Hope the expert can help me.
    Thank you very much.
    Best regards,
    Alias

    Alias,
    If there is any other simple solution, do inform
    Of course there is more than one way to skin a cat.  Here are a couple of ways:
    =if(substr[Po_ID];1;1) inlist ("0";"1";"2";"3";"4";"5";"6";"7";"8";"9");"Number";"Not a number")
    =if(substr[PO_ID];1;1)>="0" and substr([Po_ID];1;1)<="9";"Number";"Not a number")
    Personally I have more confidence in the first example, but the second example may work reliably.  It's just that I've used the first method more often...
    Thanks,
    John

  • Date Format for the input Variable

    Hi all,
    I got an issue with Date format we enter in the input variable screen for the BEx Analyzer.
    We have given a format of MM/DD/YYYY. But when the users accessed the report, it is not taking the format of the variable i.e MM/DD/YYYY but it is taking the format of the users system.
    If the user's system format is DD/MM/YYYY, it is accepting the input inthe same format only.
    Why this strange behaviour?
    My questions are
    Is the input for BEx system specific? or variable specific?
    Rgrds
    Kumar

    Hi,
    I think it is user specific... you can maintain the date format for user ....
    Go to SU01 transaction or.. Go to SYSTEM -> User Profile -> Own data
    Here in defaults tab you can see the date formet for user...
    Hope this helps...
    Thanks,
    Vikrant Mahajan

  • How to change date format for prentation variable in Formula

    Hi experts.._
    I need to change date format for presentation variable in formula..
    my dashbord date prompt format: mm/dd/yyyy(i have created one presentation variable for this prompt: pv_date)
    now i need to show it as : month-dd-yyyy
    Thanks in advance
    Regards
    Frnds

    Hi Kishor...Thanks for reply...
    But i need to change my precentation variable date formt...
    i need to write one text like: 'Year to dd/month/yy' in one column formula..
    So how can i achieve it..

  • How to change date format for prentation variable

    Hi experts
    In my prompt the date format is MM/DD/YYYY . I have created one presentation variable for that but i want to use this in Formula as well in Title as: DD-MON-YY
    So how can i achieve it..
    Thanks in advance
    Regards
    Frnds

    Hi
    i think this can't be done through any code like oracle uses to_char, to_date function.
    Just follow this
    http://oraclebizint.wordpress.com/2007/12/19/oracle-bi-ee-101332-dates-dates-and-dates/
    With this, wherever you have this column, you will be getting this format dates..
    if you don't want in reports you can change it by mentioning the data format for that paricular column in report, but for the same column, if you want different format at different places (for prompts), you can't do that..

  • Supported date formats for sorting

    Can someone point me to a document describing the supported
    date formats for sorting? I mean, how should I format a date column
    in an XML dataset in order to have this column correctly sorted
    using the Spry framework?
    Thank you and sorry if the question is trivial.

    Thanks, what I have done for the moment as a temporary
    solution is to use the two date formats and have them both inside
    the one cell in the table (the column for the sortable date
    yyyy-mm-dd). In my CSS I have created a style for the first date
    that has it's visibility as hidden. That way it's sorting the Date1
    but only Date2 is being shown to the users as the other cells have
    more than one line of text it doesn't look too off centre.
    <div spry:region="ds2">
    <table width="662">
    <tr>
    <th width="127" class="eventhead"
    spry:sort="Date1">Date</th>
    <th width="151" class="eventhead"
    spry:sort="Type">Type</th>
    <th width="146" class="eventhead"
    spry:sort="Title">Title</th>
    <th width="189" class="eventhead"
    spry:sort="Venue">Venue</th>
    </tr>
    <tr spry:repeat="ds2" spry:setrow="ds2">
    <td height="53" class="event">{Date2}<span
    class="eventhide">{Date1}</span></td>
    <td class="event">{Type}</td>
    <td class="event">{Title}</td>
    <td class="event">{Venue}</td>
    </tr>
    </table>
    </div>
    </div>
    It seems to be working for the moment...

  • Date Format for Language

    Hi all,
    is there any possibility to customize the default date format for the portal for the languages?
    When I set the user language to EN, date format for EN is default MM/dd/yyyy. I would like to have dd MMM yyyy (like 12 Aug 2005).
    Thanks in advance
    balop

    Hi peter,
             I thought you wanted to change the date format in the webdynpo implementation(coding).Now I got what you wanted ie date in ur reqd format from the picker UI itself.
             I really dont see much support in Webdynpro Date picker UI as of now for ur requirement.
            Anyway thanks for giving me a good question to think )
    Rdgs,
    G

Maybe you are looking for

  • Memory upgrade for Lenovo 3000 V200 - only 2Gb seen :(

    I bought 2 Transcend DDR2 800 SO-DIMM modules 2Gb each to upgrade memory on Lenovo 3000 V200 notebook. When I installed them, BIOS (and Windows) sees only 2Gb instead of 4Gb (i use x64 OS so no prob with OS here). When I install one of new modules an

  • Iphone won't power on

    I just bought a used IPhone 2 days ago and everything was working fine. Today it went into sleep mode with 35% battery remaining. An hour later I pressed the home button and nothing happened. Then I tried the hold button and nothing. I plugged in the

  • FTP Adapter in SOA 11g

    Hi All, I am using a FTP adapter to get files from remote server. The FTP server has password authentication type security. In the connection factory I have given host, port, user name, password and sftp=true.  Is there any way to test this connectio

  • Add WHERE criterias in addition to what the user enters on search page

    Hi, This may be a simple problem, but I have not been able to solve it.....Is there a way for me to code another search criteria in addition to what the user enters? I'm trying to create a simple search page. Basically, user logs on, i get his acooun

  • Unconfirmrd material in MD04

    Dear Friends... When I create a Sales Order   the Item in schedule line does not get confirmed due to a delivery block, but shows up in MD04. Ideally does unconfirmed material  show up in MD04 or does it not. Thanks Ravi