How to order by dates?

How do you ORDER BY DATES descendingly?
Let's say i have a column named log_Date and the format is 12/03/04 1:04 PM
Is there an easier way in ordering that kind of date format? If so, what is the code for that?
If there's none, then I'm thinking of substringing the month day and year.
First you substring the year first because you need to check the year first, then followed by the month then day.
I tried ORDER BY LEFT(6, 8,  log_Date) DESC, LEFT(0, 2, log_Date) DESC, LEFT(3, 5, log_Date) DESC but that code doesnt work.
Please help! thanks!

i made it.
i tried ORDER BY convert(datetime, log_Date) DESC and it works. thanks!

Similar Messages

  • How Production Order finish date and time is being comptued by SAP?

    Hello Expert,
    How Production Order finish date and time is being comptued by SAP? for example, we create a Production Order via CO01, the basic start date is 29.09.2008 and time is 04:00 it gives us basic finish date is 29.09.2008 and time is 13:28.
    how does SAP compute the time 13:28 as it finished time
    Please explain me briefly.
    Thanks
    Ryan

    Hello Guys,
    When we create Production Order in R/3 the time is calculated by routing but it is extended at SetUp machine time. It is not correct?. SetUp imachines time used only for first Production Order for the same product and it is plan manually, for others Production Order we need calculate time for production without SetUp machine time being pick up to compute finish time. how could we achieve this? only those Machine time will be check.
    thanks

  • How can i have my tasks in order by date like outlook on my iphone 4

    how can i have my tasks in order by date like outlook on my iphone 4

    Use a task management app that sorts by date? There are lots of options in the App Store.

  • How do I get items from itunes U to display in order by date rather than in alphabetical order?

    The podcasts I listen are automatically organized chronologically. I downloaded something from itunes U and it is organized by date in itunes but alphabetically on my ipod so I have no idea which one actually comes first. I'd appreciate some help in knowing how to put them in order by date. Thanks.

    Hi Richard,
    Based on my experience, I don't think drill-down links can be included in alerts/messages.
    Thanks,
    Gordon

  • How to fetch post goods issue date and sales order creation date

    Hi All,
    How to find out the difference between SD Sales Order Item Creation Date and final Post goods issue Date. I would like to know how to fetch those dates and what is the relationship between the tables from which i will get the dates.
    Please let me know the solution .
    Thanks in advance.

    Hi,
    Sales order creation date is when u raise a sales order in favor of the customer using VA01.......using ATP logic system purposes the material availability date....
    after saving ur sales order...when u raise the Delivery using VL01n  w.r.t to OR...than u have to perform picking ....In the picking Tab...specify the amount to be picked than press Post Good Issue....means the goods left the company premises ..
    You can the fetch the values using tables-  Use T code   SE12  or SE16
    Vbak-----order header
    Vbap-----order item
    Vbek-----order schedule line
    Likp-----Delivery header
    Lips----Delivery item

  • How to change operation dates in Production Order /Capacity Leveling

    Dear Experts ,
    We are using ECC 5.0 .In production order , scheduling happing as Backward  based on the Sales Order Delivery Date .I am doing the following :
    1.Demand as Sales Order with Delievery date : 20.03.2010
    2.Running MRP with Lead Time Scheduling -2  in md02 and converting the Planned Order to Production Order .
    4.Production Order have following dates :
             Basic Finsish Date : 21.03.2010
             Basic Start : the day Pl.Or--Pr.Ord
             Schedule Start : 15.03.2010
             Schedule Finsish : 17.03.2010
            Schedule Release : 13.03.2010
    5.In schedueling margin key :  Float Before Production : 3    , FAP : 3 , Release Period : 2
    6.In material master : Work Scheduling View : Setup : 3 days , Processing : 4 ,Interoperation : 2 for one Base Qty 1
    7.In operation : Op1  : Start Date  : 15.03.2010    Finish Date: 15.03.2010
                             Op2 : Start Date : 16.03.2010      Finish Date : 17.03.2010
                             Op2 : Start Date : 17.03.2010      FD : 17.03.2010
    Question :
    1.How to change the Operation dates  in Production Order Operation over view screen ? Today,  operation over view screen , Start date and Finsih Date  of individual operation are not changable with in Production Basic Start /BF date  or beyond .It is only changing based on the Standard Value : Labor
    2.How to change/re-schedule operation dates d in CM21 (Graphical view -Work Center Capacity load as per   Production Order and Operation combination ) based on capacity availale in advance dates? I am using  Time Profile : SAPSFCZ002 -SFC Graph midterm-3 motnhs and Planning  ,
    How to solve this above issue in scheduling operation and capacity distribution .
    Regards
    JH

    Closing the thread

  • How to do INIT for Sales order Itema Data (DS 2LIS_11_VAITM)

    Hi all
    I have a report on sales order item data, I have to reload it. DS 2LIS_11_VAITM
    Can any of you pls explain me the steps to do the INIT? Refill set up tables etc
    Many Thanks in advance
    Ishi

    Hi Hari
    Many Thanks for the explanation and steps. I deleted set up tables and executed to fill it.
    It says in R/3 Start of Processing, I ticked to continue and its still running.
    In the mean time I checked RSA3 and it says 1007 records selected. I am refreshing it and the no. of records are still the same.
    Can you tell me how long it takes to fill the table?
    And the R/3 system is still running (Start of Processing)
    Thanks again
    Ishi

  • HOW CAN I GET THE PURCHASE ORDER RELEASE DATE

    Dear All,
    HOW CAN I GET THE PURCHASE ORDER RELEASE DATE - any reprot is there?
    Thank you
    Ahmad

    Hi,
    u goto that PO and select Environment on top line .under that select header changes if u click on that u will get entire details who reased when released, date , time etc
    regards,
    Srinivas Kona

  • Sales Order - How to make Delivery Date default to Lead Time?

    My scenario is this:
    - We have items that go thru several production stages before it is a finished item that can be sold.
    - Each production item has its lead time loaded.
    - I would like the delivery date of a finished item to equal the sum of the productions items lead times.
    I dont want my sales people to have to look at calendars are calculate how long until something is ready for delivery.
    I would like my sales orders delivery date to default to a date that sales people can use.
    Is this possible? I would think this would be part of core functionality but I do not see this.
    Thank you,
    John Sefton

    John,
    Knowing what Items are added to the Sales Order at the time of entry would not be possible without SDK since the line level details are stored internally in temp location.
    Only on Submitting the Sales Order would it be possible to calculate the date.
    Let me know how you would want to move on this
    Suda

  • How to get change date in Production Order ?

    Dear Friends,
    I want to know it, how to get change date in Production Order "Administration-TAB".
    F1-Help, It is displayed with "Change date for Order Master". and Structure table "CAUFVD".
    But, CAUFVD is not Transp. Table.
    Which table should I read ?
    Thanks in advance
    Yamazaki-H

    Dear Friend
    Thank you for an answer.
    It was settled.
    Best regards.

  • How to change order header data before SAVE in CRM 2007

    Hi,
    I want to modify service order header value before saving it, to achieve this :
    1) Implemented BADI ORDER_SAVE
    2) in the method CHECK_BEFORE_SAVE, read order details by using FM CRM_ORDER_READ and done all validations.
    3) Now i want modify one field value. how to do that ?
    i came to know that by using FM CRM_ORDER_MAINTAIN or CRM_ORDERADM_H_MAINTAIN_OW data can be update/modify.
    Is this right ? what are the parameters i need to pass and exactly in which method i have use this FM.
    I want to pass the value in CRMT_ORDERADM_H_WRK(ET_ORDERADM_H) structure i.e. only for one filed.
    Please let me know how it can be done.
    Thanks
    Bhanu

    Hi,
    I am using following code, please correct if it is wrong.
    DATA : IS_ORDERADM_H_COM  TYPE CRMT_ORDERADM_H_COM,
               CT_ORDERADM_H  TYPE  CRMT_ORDERADM_H_COMT,
               IT_INPUT_FIELDS    TYPE CRMT_INPUT_FIELD_TAB,
               WA_INPUT_FIELDS    TYPE CRMT_INPUT_FIELD,
               IT_FIELD_NAMES     TYPE CRMT_INPUT_FIELD_NAMES_TAB,
               WA_FIELD_NAMES     TYPE CRMT_INPUT_FIELD_NAMES,
               IT_SERVICE_H       TYPE  CRMT_SERVICE_H_COMT,
               WA_SERVICE_H       TYPE  CRMT_SERVICE_H_COM.
    After reading order header data from "'CRM_ORDER_READ", pass header data to below structure
        MOVE-CORRESPONDING EW_ORDERADM_H TO IS_ORDERADM_H_COM.
       IS_ORDERADM_H_COM-ZZFLD00000Y = '123456'.  <== want to save value in this field created on service header screen by using AET
        APPEND IS_ORDERADM_H_COM TO CT_ORDERADM_H.
        WA_SERVICE_H-REF_KIND = 'A'.
        WA_SERVICE_H-REF_GUID = EW_ORDERADM_H-GUID.
        WA_SERVICE_H-MODE     = 'B'.
        APPEND WA_SERVICE_H TO IT_SERVICE_H.
        WA_INPUT_FIELDS-REF_GUID = EW_ORDERADM_H-GUID.
        WA_INPUT_FIELDS-REF_KIND    = 'A'.
        WA_INPUT_FIELDS-OBJECTNAME = 'ORDERADM_H'. <= Is this right ?
       WA_INPUT_FIELDS-LOGICAL_KEY =  ? what is nothing but logical key
        WA_FIELD_NAMES-FIELDNAME  = 'ZZFLD00000Y'.
        WA_FIELD_NAMES-CHANGEABLE = 'X'.
        APPEND WA_FIELD_NAMES TO IT_FIELD_NAMES.
        WA_INPUT_FIELDS-FIELD_NAMES = IT_FIELD_NAMES.
        APPEND WA_INPUT_FIELDS TO IT_INPUT_FIELDS.
    CALL FUNCTION 'CRM_ORDER_MAINTAIN'
        EXPORTING
       IT_SERVICE_H                  = IT_SERVICE_H <= is this required ?
        CHANGING
           CT_ORDERADM_H              = CT_ORDERADM_H
          CT_INPUT_FIELDS                = IT_FIELD_NAMES
         EXCEPTIONS
           ERROR_OCCURRED                = 1
           DOCUMENT_LOCKED               = 2
           NO_CHANGE_ALLOWED             = 3
           NO_AUTHORITY                  = 4
           OTHERS                        = 5.
        IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
    awaiting for your replies
    Thanks
    Bhanu
    Edited by: Bhanupracash on Apr 6, 2011 2:14 PM

  • How to skip the date in breakdown maint order

    Dear PM Guru's,
    please suggest me how to skip the date inbetween the two working days. please check the below scenario: based on factory calendar (production ) saturday was holiday. one breakdown maintenance order was opened on friday afternoon and its closed on sunday afternoon. now user wants only breakdown hours of production running days/ hours. production was produced upto saturday earlymorning and its renewed sunday morning. where as saturday producion was not planned and its not produced , so user wants to skip that time from the breakdown duration calculation. please suggest me is it right practice? if its right how we have to do in SAP? please let me know it.
    thanks in advance to all the PM guru's
    regards
    Jalu

    Hi,
        check this link Equipment Downtime
    I believe u may have to recalculate the breakdown hrs using some FM in user exit QQMA0014 QM/PM/SM: Checks before saving a notification

  • How can I change dates on photos in Elements so I can control order of photos in album in adoberevel

    I have some of my photos in adoberevel albums, and have learned the only way to change the order of those photos in those albums is to change the date or event in my Elements 9 library. I'd prefer to work with changing the photo date, but don't know how. Can anyone help me?
    Trish 

    Jon, Thanks for responding. I have only the "free" cloud uploads allowed on Revel, so they were uploaded automatically some time ago. When I first looked at them, they appeared to be a total disaster and I decided not to look again, and was happy to keep my images on my computer in Elements 9. But looking yesterday (someone had contacted me about images of my art), I found things looked better. The only problem is the sequencing of the images, and from what I read on a Community thread is that I have to change either the dates or the events. Well, today I saw how to change the dates on Adobe (only did it with one photo as a test), but that ____ so far___ has not changed the sequence in Revel. So, I will close and re-boot my computer to see if that makes a difference, and get righy back to you. Thanks again for responding!
    Trish

  • How to correctProcess Order confirmation data posted in the previous month

    Hi All PP Gurus,
    Can anybody tell me the answer of following
    How we can correct the process order confirmation data posted in the previous month.

    Dear Ashok/Brahmankar,
    Actually i am facing the following problem:-
    1) If you cancel the confirmation done in the previous month by the tcode CORS, the CO document is posted in the previous period because we cannot change the posting date in CORS. But the previous period is already closed.
    Can we change the posting date in CORS manually? Or do you have any other idea? 
    2) When reading the master data in COR2, I face the error because the status of PO is already set as 'DLV'.
    Do we need to read the master data even when the value is changed in KP26?
    Thanks,
    Narayan

  • How to load Sales Transaction (Order,Quatation) data

    Hi Gurus,
    I have uploaded Sales Master data into BW system but now
    I want to upload order & quataion data into the system. how to do that. please guide me on this or if there is any document please send me or give me details.
    My Email id is : [email protected]
    Thanks in Advance,
    Regards,
    Rakesh

    Hi,
    transfer the following infosource from r/3
    2LIS_11_VAHDR
    check the following link
    http://help.sap.com/saphelp_nw70/helpdata/en/c3/18f23864eec97ae10000000a114084/frameset.htm
    replicate that infosource in bw side and do the mappings. install the particular bi content for that data source and the do the mappings between infosource and infocube and create the infopackge anf load the data.
    hope this help you
    regards
    harikrishna N

Maybe you are looking for