How to get  day if we give the date

i want the day for tghis date(16-march-2006), how to get that
select to_char(sysdate,'day') from dual,it gives the correct day but select to_char('16-mar-06','day') from dual it gives error,
so how to get that day

Hi
First convert it '16-MAR-06' to date then give format
select to_char(to_date('16-MAR-06','DD-MON-YY'),'day') from dual;
TO_CHAR(T
thursday
Khuram Siddiqui
[email protected]

Similar Messages

  • How to get days and months when two dates are given

    Hi All,
    I have a requirement where I need to return the number of months and days between given dates.
    I dont need to take the year into account as the dates difference is always less than an year
    I have 28-jun-2012 and 31-jan-2013 as dates.
    I'm working on 10g
    when I do select months_between(:a,:b) from dual and provide those dates it gives me 7.09677
    I want it to give as 7 months and 9 days or what ever the exact days are.
    Your inputs are much appreciated

    BluShadow wrote:
    874719 wrote:
    Thanks a lot,BluShadow for your answer and would you mind giving it for the year as well like 0 years 7 months 3 days?Your original post said:
    I dont need to take the year into account as the dates difference is always less than an yearNow you've got the idea, why not have a go yourself first, and then if you're still not getting it, post what you've tried so we can help you.Oh... go on... I'm in a good mood today...
    SQL> ed
    Wrote file afiedt.buf
      1  with t as (select date '2012-06-28' as start_date, date '2013-01-31' as end_date from dual union all
      2             select date '2012-02-29', date '2012-06-30' from dual union all
      3             select date '2010-02-28', date '2012-06-30' from dual union all
      4             select date '2012-02-29', date '2012-06-15' from dual
      5            )
      6  --
      7  select start_date, end_date
      8        ,months_between(end_date,start_date) as mnth_bet
      9        ,floor(months_between(end_date,start_date)/12) as yr
    10        ,floor(mod(months_between(end_date,start_date),12)) as mnth
    11        ,case when to_number(to_char(end_date,'DD')) >= to_number(to_char(start_date,'DD')) then
    12           to_number(to_char(end_date,'DD')) - to_number(to_char(start_date,'DD'))
    13         else
    14           (to_number(to_char(last_day(start_date),'DD'))-to_number(to_char(start_date,'DD')))+
    15           (to_number(to_char(end_date,'DD')))
    16         end as dys
    17* from t
    SQL> /
    START_DATE           END_DATE               MNTH_BET         YR       MNTH        DYS
    28-JUN-2012 00:00:00 31-JAN-2013 00:00:00 7.09677419          0          7          3
    29-FEB-2012 00:00:00 30-JUN-2012 00:00:00          4          0          4          1
    28-FEB-2010 00:00:00 30-JUN-2012 00:00:00         28          2          4          2
    29-FEB-2012 00:00:00 15-JUN-2012 00:00:00  3.5483871          0          3         15

  • How to get rid of zeros for the data which has been extracted with open hub

    Hi all
    I am trying to extract data from the cube thru an open hub, but the data which i have extracted, for a cost center i am able to see '0's which is expected to be an empty space, even in cube there is an empty space.
    Can anyone suggest me quickly, points will be rewarded
    thanks
    preethi......

    In the transformation of the Open Hub,use BAPI....
    Create a target structure with all fields as type characters,move data from source structure to target structure in the BAPI using ABAP codes.When there is no value in character fields it would not show up 0's.

  • How to get days , months , years between two dates with groovy

    I've a table that contains Start Date and End Date and I want to get the difference between then in this format 2 days , 1 moth , 1year
    Can I make this with Groovy
    I've added a transient attribute to a view object and make its value      return (EndDate) - (StartDate); but this returns the difference of days like 200 day
    I want it in this format 2 days , 1 moth , 1year

    AFAIK - You cannot do it in groovy.
    You can achieve the same using the transient variable approach.
    Create a VORowImpl Class for VO, and in the getter method of the transient variable - do the necessary logic and return the string as required in your use-case.
    Thanks,
    Navaneeth

  • How to Get Exchange rates based on the date ?

    Hi Friends,
    I have a table called "ZEXCH" with fields MANDT, BUDAT, WAERS, KURSF. This is a maintainable table .... (ie) user can keep on adding the Exchange rates for the currencies for a particular date....
    My table contents are:
    MANDT BUDAT      WAERS   KURSF      
    080   30.08.2002 USD        50.00000
    080   30.01.2006 USD        40.00000
    080   09.03.2006 USD        30.00000
    Now if i run the report with Budat = 31.12.2002 it should pick up line item 1.
    similarly if i run the report with Budat = 31.03.2006 it should pick up line item 2.
    similarly if i run the report with Budat = 31.05.2006 it should pick up line item 3.
    How could i do this????
    Expecting your answers
    thanks in advance...
    Cheers
    R.Kripa.

    Hi,
      Use the following code snippet, you need to have the 'exchange rate type' as one of the fields in order to distiguish between different rate types, the standard rate type used in most of the cases is 'M',
    select KURSF from zexch
            into zexch-KURSF
            up to 1 rows
            where kurst = 'M'
            and   fcurr = 'USD'
            and   tcurr = 'INR'
            and   BUDAT >= Date given in the selection.
            endselect.
    Hope this helps,
    Rgds,

  • I'm french, my white Ipod4g 16gb has been stolen 2 days ago, I would like to know how to get it back thanks to the serial number! please

    I'm french, my white Ipod4g 16gb has been stolen 2 days ago, I would like to know how to get it back thanks to the serial number! please

    You can't.
    Change your iTunes (Apple ID) password along with any other password that was stored in the iPod.  If any passwords are associated with credit cards, contact the CC company and get your card replaced (with a new number).  If any passwords are associated with a bank or any other savings institution, contact them also and discuss approprate action with them.
    The only real protection you have is with the personal information on the device rather than the physical device itself.  This requires action before the device is lost/stolen.  If the device has significant personal information, it should have a strong 8-digit (or longer) password AND be configured for automatic wipe in the event of ten consecutive incorrect password entries.

  • How to get day of week from NSDate?

    How to get day of week from NSDate?

    Here's a way to get the name of the weekday as an NSString if you've already got an NSDate...
    NSDate * testDate = [NSDate date];
    NSString * weekdayString = [testDate descriptionWithCalendarFormat:@"%A" timeZone:nil
    locale:[[NSUserDefaults standardUserDefaults] dictionaryRepresentation]];
    NSLog(@"Day of the week: %@", weekdayString);
    The output is something like:
    Day of the week: Monday
    You can use a lower-case "%a" as the descriptionWithCalendarFormat if you just want the three character weekday abbreviation ("Mon", "Tue", "Wed", etc).
    Steve

  • How can we give the Data Format (File Type ) in Runtime

    Hi all,
    How can we give the Data Format (File Type ) in Runtime for the following method,
    cl_gui_frontend_services=>gui_download.
    Thanks in advance
    Sri

    There is a filetype parameter which you can set
    CALL METHOD cl_gui_frontend_services=>gui_download
      EXPORTING
    *    BIN_FILESIZE              =
        filename                  =
    *    FILETYPE                  = 'ASC'
    *    APPEND                    = SPACE
    *    WRITE_FIELD_SEPARATOR     = SPACE
    *    HEADER                    = '00'
    *    TRUNC_TRAILING_BLANKS     = SPACE
    *    WRITE_LF                  = 'X'
    *    COL_SELECT                = SPACE
    *    COL_SELECT_MASK           = SPACE
    *    DAT_MODE                  = SPACE
    *    CONFIRM_OVERWRITE         = SPACE
    *    NO_AUTH_CHECK             = SPACE
    *    CODEPAGE                  = SPACE
    *    IGNORE_CERR               = ABAP_TRUE
    *    REPLACEMENT               = '#'
    *    WRITE_BOM                 = SPACE
    *    TRUNC_TRAILING_BLANKS_EOL = 'X'
    *  IMPORTING
    *    FILELENGTH                =
      changing
        data_tab                  =
    *  EXCEPTIONS
    *    FILE_WRITE_ERROR          = 1
    *    NO_BATCH                  = 2
    *    GUI_REFUSE_FILETRANSFER   = 3
    *    INVALID_TYPE              = 4
    *    NO_AUTHORITY              = 5
    *    UNKNOWN_ERROR             = 6
    *    HEADER_NOT_ALLOWED        = 7
    *    SEPARATOR_NOT_ALLOWED     = 8
    *    FILESIZE_NOT_ALLOWED      = 9
    *    HEADER_TOO_LONG           = 10
    *    DP_ERROR_CREATE           = 11
    *    DP_ERROR_SEND             = 12
    *    DP_ERROR_WRITE            = 13
    *    UNKNOWN_DP_ERROR          = 14
    *    ACCESS_DENIED             = 15
    *    DP_OUT_OF_MEMORY          = 16
    *    DISK_FULL                 = 17
    *    DP_TIMEOUT                = 18
    *    FILE_NOT_FOUND            = 19
    *    DATAPROVIDER_EXCEPTION    = 20
    *    CONTROL_FLUSH_ERROR       = 21
    *    NOT_SUPPORTED_BY_GUI      = 22
    *    ERROR_NO_GUI              = 23
    *    others                    = 24

  • Although my ipod shows the number of steps, calories, and time, it no longer is saving it to the history. also when I open the history it takes me to May 2010 instead of the current date. Any ideas on how to get it to start recording the history again?

    Although my ipod shows the number of steps, calories, and time, it no longer is saving it to the history. Also when I open the history it takes me to May 2010 instead of the current date. Any ideas on how to get it to start recording the history again?

    Try:                                               
    - iOS: Not responding or does not turn on           
    - Also try DFU mode after try recovery mode
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings
    - If not successful and you can't fully turn the iOS device fully off, let the battery fully drain. After charging for an least an hour try the above again.
    - Try another cable                     
    - Try on another computer                                                       
    - If still not successful that usually indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order.
    Apple Retail Store - Genius Bar
    The missing apps could have been done by setting the Restrictions that can hid those apps. If the backup was made with those retrictions set the the Restrictions are also restored.
    Thus, if you get it to work restore to factory settings/new iPod, not from backup                               
    You can redownload most iTunes purchases by:        
      Downloading past purchases from the App Store, iBookstore, and iTunes Store

  • I just need to know how you get an iTunes library off the original hard drive of a mac and onto an external hard drive and still have it work normally?

    I just need to know how you get an iTunes library off the original hard drive of an imac and onto an external hard drive and still have it work as it normally would?

    http://support.apple.com/kb/HT1449

  • My dad has itunes on his PC. I don't have my own but I recently have an iPad mini and an iPod. I don't know how to get songs onto itunes on the PC, using a different account or at least private/ separate..

    My dad has itunes on his PC. I don't have my own but I recently have an iPad mini and an iPod. I don't know how to get songs onto itunes on the PC, using a different account or at least private/ separate..
    So how do I create a separate I tunes on a PC which already has itunes... Or if not can I plug my iPad to the PC and use itunes on my iPad, and drag mp3s from a computer.
    I'm not sure what the equivalent of a desktop is on the iPad.. And I don't actually know how to use the icloud either...
    Can anyone start me off, given it have a iPad and use of a PC - not mine with existing iplayer
    I do have spotify soundcloud so I could potentially use these.. If there is a route of getting either mp3's etc to end up on my iPad or iPod.
    Kind Regards

    iTunes 11
    If you  have iTunes 11 turn on the Sidebar.  Go to iTunes>View and click on Show Sidebar. You can also do a Crtl+S to show the sidebar. The sidebar is where Devices appears. and Control+B to show the Menu bar
    To import music into your iTunes library on the computer go to iTunes>Help>iTunes Help>Add items to iTunes and follow the instructions
    To sync to your iPod go to iTunes>Help>iTunes Help>Sync your iPod....>Sync You Device and follow the instructions.

  • DATA TRANSFER - How to get a SINGLE SPACE in the downloaded file from UNIX?

    Hi Experts,
    Am sending data from SAP to UNIX/ Application server and text file on desk top as well.
    So, I am keeping a single character just SPACE at the END of each record.
    Then, When I see the downloaded text file, I found a SINGLE SPACE at the end of each record, fine.
    Then, by using CG3Y t code, I downloaded the UNIX file to my desk top.
    But, When I see this UNIX downloaded file from UNIX, I did NOT find any SPACE at the end of each record!!!
    Am doing every thing same in both cases.
    So,
    1 - Why its happening in case of UNIX file?
    2 - How to get a SINGLE SPACE  at the END in the downloaded file from UNIX?
    thanq

    Hi,
    I don't know if this works:
    perform SET_TRAIL_BLANKS(saplgrap) using 'X'.  
    perform SET_FIXLEN(saplgrap) using '0' '060'.   "put length of your line from-to
    ... download ...
    It will put space at the end of your line, according to the length.
    Hope it works,
    Chang

  • HT1222 My phone is telling me about a Software Update but for the first time it is asking me for a passcode, I have never set up a passcode and do not know how to get around this to do the upgrade?

    My phone is telling me about a Software Update 7.1.1 but for the first time it is asking me for a passcode, I have never set up a passcode and do not know how to get around this to do the upgrade?

    See if this helps:
    iOS: Forgotten passcode or device disabled after entering wrong passcode
    http://support.apple.com/kb/ht1212

  • How to get default values while using the transaction "BP"

    Hi Group,
    I have a query on how to get default values while using the transaction <b>BP</b>?
    The thing is:
    when I enter into the transaction "BP", I need to see some default values to some of the input fields in the screen.
    how can I achieve this?
    So please kindly let me know the procedure to achieve this.
    Thanks & Regards,
    Vishnu.

    Hi,
    The events of BDT can be used to default some fields on creating a partner.
    For this create a function module for ISDAT. attach that event in BUS7.
    In the ISDAT funtion modulethe following code should be used.
    For example to set the nationality:
    I_BUSDEFAULT-NATIO = 'DE.
    CALL FUNCTION 'BUP_BUPA_FIELDVALUES_SET'
    EXPORTING
    i_busdefault = I_BUSDEFAULT
    Regards, Smita.

  • How to get a check box on the selection screen

    Hi all
    can any body tell me how to get a check box on the selection screen

    parameter: pa_check   as checkbox.
    To define the input field of a parameter as a checkbox, you use the following syntax:
    PARAMETERS <p> ...... AS CHECKBOX ......
    Parameter <p> is created with type C and length 1. In this case, you may not use the additions TYPE and LIKE. Valid values for <p> are ' ' and 'X'. These values are assigned to the parameter when the user clicks the checkbox on the selection screen.
    If you use the TYPE addition to refer to a data type in the ABAP Dictionary of type CHAR and length 1 for which 'X' and ' ' are defined as valid values in the domain, the parameter automatically appears as a checkbox on the selection screen.
    REPORT DEMO.
    PARAMETERS: A AS CHECKBOX,
    B AS CHECKBOX DEFAULT 'X'.

Maybe you are looking for

  • HP PSC 1210 - Scanner Not Working

    Dear All, I am using HP PSC 1210 Printer. And the scanner function suddenly stopped working after I've upgraded my Mac ver to V10.9.4. I've contacted Apple Support for help and they advised to contact HP for the latest driver.  Can someone help me wi

  • Rating Versions, and then finding them

    I have been trying to rate a given version of a photo with 5 stars, and then find it at a later date by searching in the library for all photos with a rating of "5 stars", however unless I rate both the master image AND the version that I like as "5

  • Formula to paste data that exists beside a pop-up menu.

    I'm using a pop-up menu that I share between two tables, Table-A and Table-B. (I copy the original pop-up menu in Table-A to Table-B) In Table-B want to populate the cell beside the value I select from the pop-up menu with the value of the cell besid

  • How to get the space to clear after trash/delete

    I've trashed/deleted files to clear space on both my Powerbook hard drive and an external hard drive, but the "space" isn't opened up. How do I finish the job of deleting, so gigs are freed up??? Thanks.

  • Safari + MySpace... Again

    Hey guys.. I know this topic has been covered and covered and covered... And I've tried searching through old topics before I asked this, but I couldn't find the answer to my particular predicament. For some reason, in safari, I cannot log in to mysp