question about the date as output parameter

Hello
I tried the following procedure to extract the out parameter as DD/MM/YYYY
CREATE or replace PROCEDURE p1 (p IN NUMBER, x OUT date, y OUT date) 
IS 
BEGIN    
x := to_date(to_char(sysdate,'dd/mm/yyyy'),'dd/mm/yyyy') ;
y:=  to_date(to_char(sysdate+1,'dd/mm/yyyy'),'dd/mm/yyyy') ;
END P1; 

declare    
foo date;    
bar date; 
begin    
p1(5,foo,bar);    
dbms_output.put_line(foo || ' ' || bar); 
end; 

And the output is   17-AUG-12 18-AUG-12   , instead of   17/08/2012   18/08/2012  
The nls_date_format is: DD - MON - RR

How can I get the output as dd/mm/yyyy format parameter.
Thank you

Published by: Smile on August 17, 2012 08:31

Because your data type is date, the default output is the NLS_DATE_FORMAT.

You can set NLS_DATE_FORMAT jj/mm/aaaa, but in reality, it would be better to do the following:

Declare your out parameters as varchar2
Convert date to be returned to your format of binding and value the more parameetrs to have this value

Tags: Database

Similar Questions

  • Questions about the data reporting PowerCLI store

    Hello

    I have a problem with a script that I use and I'm looking for an idea on the problem.

    I have a script that gathers pretty much all the information on the virtual machine in my cluster. (Disk size, free disc, data store).

    Most of the time, it works very well. But there is something that bothers me little. It doesn't report the data store that each VM is linked to. It works for most, but on a select few, it's not.

    I wonder if there is something in my script which is the first cause, or if it is a question of VSphere.

    My script and the output is attached.

    Thanks in advance for the help.

    -Aaron

    I was able to get the warehouses of missing data as well.

    That's when the VMDK are stored on more than 1 data store for a specific virtual machine.

    In this case, the line

        $myDS = Get-Datastore | Where { $_.Id -eq $VM.Datastore}
    

    nothing will store in $myDS because $VM. Data store is an array of MoRefs.

    In fact you try to map the partitions in the guest OS with data warehouses that host the VMDK files.

    There is no easy solution for that I fear (there are number of threads in this community who are trying to do the same thing).

    I fear that there is no real solution for this problem

  • Question about the dates of the file download.

    Why the dates of creation, 'last change' and especially 'last opening' all appear as a date a month when I just downloaded Mozilla for the first time on my Mac? Edit

    It's information from the database that you downloaded
    the file from.

  • Questions about the synchronization between output and analog input

    Hi all

    I now have a simple task which head a signal voltage (from PXI ao0) on a circuit and then your comments a voltage at the terminals of a component, for example, that one of the resistors in the circuit, through ai0 on PXI. So in this case, the synchronization between analog input and analog output must be made to avoid error of phase shift.

    I tried to build my VI by learning this example: https://decibel.ni.com/content/docs/DOC-3882

    However I have a few questions.

    1. I noticed that there is a merged error fed the "start task" sub VI for the analog output.  What is the point of fusion to mistake?

    2. I enclose my VI (also shown below) for the output voltage. I put my writing of DAQmx Subvi in the while loop so that I can change the voltage while the VI is running.

    However, in the example, the author has been reading outside of the loop and before even the start task. What difference will it make?

    3. I have also attached my synchronized VI. I always put the wavegeneration and the DAQmxwrite in the loop. A bulging guard error saying about samples is not available and needs to a higher sampling rate or a longer wait time. What causes this?

    I appreciate that these problems can be solved. Thanks to you all.

    (1) first you need start the task of acquiring, he'll wait for trigger here. And then you start the build task that provides this trigger. If acquisition could trigger and never start.

    (3) you must first write something in the buffer (writing DAQmx), then only you can generate it (Daqmx Start).

    Check Cont Gen tension Wfm - Int Clk - no Regeneration.vi in the help-> examples for example.

  • question about the DATE

    I have two questions:

    1.I tried these six instructions:
    select to_date(11*2,'hh24miss') from dual
    select to_date(11*2,'hh24ssmi') from dual  --error
    select to_date(11*2,'mihh24ss') from dual
    select to_date(11*2,'misshh24') from dual  --error
    select to_date(11*2,'sshh24mi') from dual
    select to_date(11*2,'ssmihh24') from dual  --error
    some mask format returned error, while others do not. someone knows why?

    2. the default date format database storage Oracle via SQL Developer directly affected by the NLS parameter in tools-> Preferences-> database-> NLS?
    because this statement:
    select to_date('24-jun-10') from dual
    return on 24 June 10 when I updated NLS me-jj-aaaa and return June 24, 2010 when NLS is set to dd-MON-rrrr.

    I use SQL Developer 2.1.1.64. Thank you

    some mask format returned error, while others do not. someone knows why?

    Online documentation will tell you...
    http://www.Oracle.com/pls/db102/search?word=date&PartNo=

  • Questions about the data form

    Hi guys,.
    just a general question: when we do a 'big' data form, it leads to overall performance problems or crashes. My question is, which is to limit the size of data? Is it the fact that Essbase has pull up a lot of data at once? Is it the fact that web applications are limited in quality? I would just get the thoughts of people on this general issue.

    Another General, somewhat vague question: IF I didn't make a huge data form, say just 10 departments, 400 accounts by cost on the lines and the period, some scenarios and years on the columns, it would help if I created a machine dedicated to planning web app? Increase RAM/CPU help?

    Take a peek on "My Oracle Support" there is an article "Hyperion Planning data form Design Considerations [ID 779502.1].
    I think that should answer most of your questions.

    See you soon

    John
    http://John-Goodwin.blogspot.com/

  • Question about the Date and TO_CHAR fields

    I ran into a date format today I need to replicate but I don't default with. I work with a based REST webservice that wants its dates and hours of formatting to ' 2009 - 09-29T 17: 00:00 - 04:00 '. When is 2009-09-29 17:00 et. Is there an easy way to reproduce this output in oracle, so I can feed him in the web service?

    You are looking for:

    with my_tab as (select to_timestamp_tz('2009-09-29T17:00:00-04:00', 'yyyy-mm-dd"T"hh24:mi:ssTZH:TZM') col from dual)
    select to_char(col, 'yyyy-mm-dd"T"hh24:mi:ssTZH:TZM') ts_col
    from   my_tab;
    
    TS_COL
    -------------------------
    2009-09-29T17:00:00-04:00
    

    Published by: Boneist on October 6, 2009 16:59
    Realized it's timestamp-> tank you were after, not the reverse. Fixed!

  • question about the date of

    Hi all

    S guy in a form i m having a point is to say refdate, now I want to work like that
    I can insert data to date in DDMMYY format and when I press tab or switch to another element my date should come the
    format dd/mm/yyyy to the point refdate

    Please help me...

    Published by: Christine Konditamde on July 27, 2009 22:08

    Navdeep,

    I wrote JJ/MM/RRRR not DD/MM/YYYY. If you use RRRR instead of YYYY, then the user can enter the 2 digits of the year, and it will automatically convert the 4 digits of the year.

    Kind regards

    Manu.

    If this answer is useful or appropriate, please mark. Thank you.

  • I have a simple question about the meta-data.

    Hello. It is a simple question about the meta-data. How can I get the video bitrate of a flv or mp4 (video playing via NetStream file) file

    right now I have this:

    Code
    var netClient:Object = new Object();
    netClient.onMetaData = function(meta:Object)
    {
    for (var in meta props) {}
    trace (props + ":" + meta [props]);
    }
    MovieClip (root) .durations = meta.duration;
    trace (MovieClip (root) .durations);
    };
    NS.client = netClient;

    And my output is:

    videocodecid: avc1
    audiocodecid: m4as
    aacaot: 2
    Width: 960
    AudioChannels: 2
    videoframerate: 23.976
    TrackInfo: [object Object], [object Object]
    moovposition: 32
    avcprofile: 77
    audiosamplerate: 48000
    avclevel: 31
    seekpoints: [object Object], [object Object], [object Object], [object Object]
    height: 540
    Duration: 221.312

    As you can see, there is nothing of video bitrate.

    I know that the video bitrate of my videos, but then I have to manually type each number of bitrate into my flash project, and it would be such a fuss when I have a lot of videos. Would be nice if flash can detect the video bitrate.

    It's for my online portfolio.

    Why you divide by 8?  If you want to convert bytes into bits, multiply by 8.

  • A few questions about the use of data and Cliq

    I have the cliq, however I chose to not get 3G (so I bought full fare). So I have a few questions about the phone and the use of 3G / 2 G/Edge:

    1 - is possible to disable completely the 2G / 3 G/Edge? I know you can switch between them, but are anyway just tell the phone to stop using them altogether since I'm not subbed to the service?

    2. when the update takes place, I guess we'll have to reconnect motoblur and etc, but if I don't have 3 G will I have motoblur connection problems after the update? Or he keeps the latest wifi settings so that it would connect to wifi to connect. When I first got my phone it was not a problem b/c I had 3G for the first month.

    I hope that makes sense, thanks!

    To stop all the data, I would like to download an application called APNDroid. He cut them all down. When you log on to blur you have 3G or WIFI doe this without getting a timeout error. During the process of setting up your Blur account, you can press the menu button and set up your wifi to work, this will connect you to Blur and your phone will be connected to the blur. If I were you I would be rethinking to do a data plan since you are really losing out on most of your main features of phones. It's your choice, however.

  • Questions about the accordion component

    I have a few questions about the use of the accordion component:

    1. when my accordion is created it shows the first container child, this child is created at this time and if you go to another child it is also created (but only until it is first accesed). The thing in the first child, I need to access the properties and components located in other children, so it marks an exception to NULL, because I am trying to access the properties or the components that have not yet been created, but I really need to access and transmit values to other children containers at the moment (without their first navigation) , then it is possible to create all the children while creating the accordion although I would'nt need to navigate through its children to create them?

    2. is it possible to disable the functions of click of an accordion, so the only way to change bewteen her children is programmatically? I mean, you can click the buttons on the accordion to navigate through his children, but you can also do this programmatically by using the selectedIndex property, so I'll try to disable accordion buttons so the only way to navigate is programmatically.

    All the ideas of these two questions?

    You can use creationPolicy = "all" on the accordion and it will create all children, not only the first condition. The downside of this is that your application will have a little more time to start. Consider this:

    Child 2:

    If you try to set child2.input = 'something', a better solution would be to use data binding:

    Child 2:
    [Bindable] public var inputValue:String;

    Now you can do: child2.inputValue = 'something '; If the user interface of child2 have not been created, the inputValue parameter has without adverse consequences; as soon as the 2 child controls are created, data binding will assign the value. If child 2 has already been created, the data binding will also affect the value.

    You can disable the click event to the accordion by intercept and stop its spread, but you must do this in ActionScript, you can't do this in MXML.

    myAccordion.addEventListener ('change', accHandler, true); true means to use the capture phase

    private void accHandler (event:flash.events.Event): void
    {
    If (event.target is mx.containers.accordionClasses.AccordionHeader) {}
    Event.stopImmediatePropagation;
    }
    }

    The idea is that intercept you the click event, as it moves down through the components (capture phase). If the target of the event is an AccordionHeader, prevent you the event to go further - it is to reach the AccordionHeader itself.

    You can put this handler on accordion or its parent up to the Application.

  • Just a quick question about the appearance of the cluster

    Hello, this is Matthew, just a quick question about the appearance of the cluster

    Is there anyway to rearrange the order of the elements? I know cutting automatic resizing, I could move the items by hand. But if I use the cluster somewhere else, I have to move the items again...

    What I want is of the order of "Mx My Mz Ax Ay Az Temp voltage CS".

    Is there a quicker way to deal with?

    THz so much!

    You can right-click the border of the cluster and choose "arrange control cluster...". "The user interface is not as intuitive as it could be, but it will allow you to reorder items. If you use the cluster in several places, you should make the cluster in a type definition and replace all current uses of the latter with the type definition, so that they all match. They will also update automatically when you make changes to the type definition. Otherwise, you could have a situation where you have multiple groups with the same data types, but with elements in a different order, and your data will be getting a new denominated, when wire you the whole clusters. The data will be in the same order, but given that the item labels are in a different order, you can't get the data you want, when ungroup you by name.

  • Recently bought a laptop computer; A few questions about the offer Upgrade to Windows 8

    I have a few questions about the Upgrade of Windows 8 offer for new computers.  I recently bought a Toshiba Satellite S855-S5268 of amazon.com, which came with Windows 7 Home Premium.  Toshiba already has a beta version of drivers and utilities for Windows 8 for the S855 on their Web site.

    (1) I bought my laptop in July of this year, and I've not yet registered for 8 Windows Upgrade offer with Microsoft.  Am I still eligible to receive the upgrade, if I sign up soon?
    (2) if I buy the upgrade through this offer, I'll be able to download an ISO file so I can burn the installation media, or do I need to upgrade to Windows 7?
    (3) if I will be able to burn the installation media, I'll be able to erase my hard drive and do a clean install of Windows 8 (which I'd rather do, I have a lot of backups of my data).  I am aware that I would probably need to provide my product key Windows 7 Home Premium 64-bit OEM during the new installation, because it is an upgrade and not a full version; This isn't a big deal, because my Windows 7 Home Premium 64-bit OEM product key is stuck at the bottom of my laptop.
    (4) my current copy of Windows 7 is activated by seeing my BIOS (I have a traditional BIOS, not a UEFI).  If I had to switch to Windows 8 and decide then I'd rather back in Windows 7, for example, a few months later, I'll be able to do that (I burned recovery of Windows 7 with the Toshiba utility disks, which I did), and Windows 7 will continue to activate by seeing my BIOS, even after the installation (and later remove) Windows 8?
    Thank you very much!

    I have a few questions about the Upgrade of Windows 8 offer for new computers.  I recently bought a Toshiba Satellite S855-S5268 of amazon.com, which came with Windows 7 Home Premium.  Toshiba already has a beta version of drivers and utilities for Windows 8 for the S855 on their Web site.

    (1) I bought my laptop in July of this year, and I've not yet registered for 8 Windows Upgrade offer with Microsoft.  Am I still eligible to receive the upgrade, if I sign up soon?
     
    Yes, the registration period is between June 2, 2012 to January 31, 2013.
    (2) if I buy the upgrade through this offer, I'll be able to download an ISO file so I can burn the installation media, or do I need to upgrade to Windows 7?
     
    Yes, the Upgrade Wizard of Windows 8 will allow you to create a bootable DVD or you can grab the ESD file and save it.
    (3) if I will be able to burn the installation media, I'll be able to erase my hard drive and do a clean install of Windows 8 (which I'd rather do, I have a lot of backups of my data).  I am aware that I would probably need to provide my product key Windows 7 Home Premium 64-bit OEM during the new installation, because it is an upgrade and not a full version; This isn't a big deal, because my Windows 7 Home Premium 64-bit OEM product key is stuck at the bottom of my laptop.
     
    Yes and there are better ways to reinstall Windows 8 without using the installation disc, you can use the reset and refresh.
     
     

    These steps will take you through refreshing your PC:

    · Press the Windows key + C on your keyboard to show the charms (if you use a touch screen: touch the right edge of your screen and drag your finger to the left)

    · Click settings

    · Click change PC settings

    · Click general in the left column

    · Under refresh your PC without affecting your files, click Start

    Then follow the instructions that will be provided on-screen to cool your PC.

    (4) my current copy of Windows 7 is activated by seeing my BIOS (I have a traditional BIOS, not a UEFI).  If I had to switch to Windows 8 and decide then I'd rather back in Windows 7, for example, a few months later, I'll be able to do that (I burned recovery of Windows 7 with the Toshiba utility disks, which I did), and Windows 7 will continue to activate by seeing my BIOS, even after the installation (and later remove) Windows 8?
     
    As long as you have a recovery disk which you should create or use the construction in the recovery partition, Yes, it will self activate.
    Thank you very much!
  • Questions about the management of specific nodes in different hierarchies

    Hi all

    I have a question about the specific management of some particular set nodes, which are located in different hierarchies within a same version.

    I want to know if there is any editing made to certain properties of these specific nodes or if the nodes are deleted/moved/edited approval to be triggered for the data manager.

    or should not allow users to edit (adding/moving/deleting/changing property values) or those specific members.


    According to my understanding of the nodes of domain prevents the removal of nodes, but I don't want my Member prefix/suffix, domain is the only way to prevent the change.




    Thanks and greetings

    Madhu

    We have an obligation to not allow a node to remove or deleted without the approval of the admin, so I created a Boolean property AllowDelete is false, which is substitutable, default and is available only in a category of property Admin, for which most of the users do not have access.  Then, I created a validation of PropRemove with an error message that tells the user to contact a user admin to remove or delete the node.  The admin can change the AllowDelete to true, then can either remove himself or to allow the user to do.

  • Questions about the implementation of clusters of storage and DTS on active cluster

    I have a few questions about the implementation of clusters of data store and SRS storage in VSphere 5.1.

    We have a data center with about 15 HP blades and a few servers non-lame.  The hosts are all either VSphere 5.0 or 5.1.  Our back-end storage is an EMC VNX 5700 with about 20 stores of data.  All the VMWare is managed by VCenter 5.1 running on a dedicated physical machine.

    Currently, each data store is used individually; No piles of data store are put in place.  When a new virtual machine is created, the administrator usually chooses the data with the most space store.  Periodically, we will go back and manually storage vMotion machines to balance the load.

    Recently, we have expanded the VNX storage, so we now have LUNS in different pools, with different levels of performance.

    What I would do is set up for the data store clusters, so that us when a virtual machine is created, the administrator must not know what data store is in which pool.  Also take advantage of the DRS storage so that the burden of storage will be "refine" himself a little.

    I know the setting up of a cluster of storage in a 'clean' environment is quite simple, but my concern is creation/conversion data warehouses existing in active production in the cluster, while they are used.

    If I access the screen "data warehouses and store data from clusters ', right-click on the data center and create a cluster, and then move the various data stores in the new cluster, will there be an interruption in the production running systems?

    I also wonder about activation of storage i/o control.  It is not currently enabled on data warehouses.  I know it's useful for the StorageDRS, but will be allowing any negative impact on the system?  If I turn on the warehouses of data, is there anything else I should do or set in addition to all that allows him?

    Finally, we are in the process of Site Recovery Manager configuration.  SRS has an impact on the configuration of the data clusters and DTS store?

    Thanks in advance for your comments.

    Mike O.

    Gregg Robertson wrote:

    Hello

    Clusters of data and using DTS store doesn't impact RS even if you create a cluster of data store for storage of replicated data and another for everyone else, this way you machines virtual you want to replicate are not moved on warehouses of data that are not replicated , but will still have the ability to move if there is a conflict.

    Gregg

    With all due respect but SRM and DTS don't go together. SRM does not at all support the use of DTS. So if you are configuring SRM forget DTS for now.

    Reason for this is that SRM knows no DTS and VMs can be in flight when a failover should occur, and bad things can happen. Also, the protection breaks when a virtual computer is moved between data warehouses in a cluster data store.

    In short: don't go there.

Maybe you are looking for