Date formula to convert 2015-06-07 00:00:00.000 to Jun-15

Hi All;
I have a date in the format
new_duedate =
2015-06-07 00:00:00.000
i need to convert it to Jun-15
I am currently using below  formula
CONVERT(CHAR(4), (new_duedate), 100) + CONVERT(CHAR(4), (new_duedate), 120)
which converts into Jun 2015
Any help much appreciated
Thanks
Pradnya07

Lots of ways
FORMAT(datefield,'MMM-yy') (sql 2012)
REPLACE(CONVERT(varchar(6),datecolumn,6),' ','-')
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

Similar Messages

  • In PDF to Excel conversion dates like 03/12/15 convert to Dec 3rd 2015 not the correct date of Mar 12th 2015 whereas date 03/13/2015 converts correctly as March 13th 2015

    In PDF to Excel conversion dates like 03/12/15 convert to Dec 3rd 2015 not the correct date of Mar 12th 2015 whereas date 03/13/2015 converts correctly as March 13th 2015

    Hi DirTech,
    Are both of these dates in the same Excel file? If they're in different files, are you choosing the same language for OCR (optical character recognition)?
    If they are in the same PDF file, how was that PDF file created? Was it created from a third-party application (rather than an Adobe application)? If it was created by a third-party application, it could be that it wasn't written to spec, and that's why you're seeing some oddities in the PDF > Excel conversion.  (See Will Adobe ExportPDF convert both text and form... | Adobe Community.)
    Best,
    Sara

  • I need a formula to convert a date into an integer (for use in Lookout)

    I have a DATA logger with the following:
    40001 = 4 (2004)
    40002 = 2 (February)
    40003 = 5 (5th)
    40004 = 13 (1:00pm)
    40005 = 12 (12 minutes)
    Lookout requires a date that it understands (eg. January 1, 1900).
    All I need is a basic formula to convert the date and time.
    This formula does not need to be specifically written for Lookout. Just a basic formula that I can do on paper or a calculator.
    I can integrate that formula into the Lookout software myself.

    Hello Smigman,
    First of all, I apologize in advance for not giving you "just the formula." And for the lengthy explanation (had to wait till after work hours), which you are very likely aware of already. I am writing this response in much detail so that it may benefit others.. hopefully And so that we understand the underlying principle involved, which will hopefully help us in building the formula the best way that suits us.
    As you have figured out, the data and time in Lookout is represented as a real number. This real number's integer portion represents days, and the decimal portion denotes time. The integer portion is basically the number of days since 01/01/1900. And the decimal portion is the number of seconds since midnight.
    So, for instance, if you insert the today() Expression in Lookout, you'll get a integer 38022 (which corresponds to today, Feb. 5th, 2004). In other words, today is the 38022nd day since 01/01/1900. Tomorrow, Feb. 6th 2004, will be 38023 and so on.
    The decimal part denotes time. A day has 24*60*60 = 86400 seconds, obviously. So, 1/86400 = 1.15741E-5 roughly represents one second. For instance, 38022.00001157 will give 02/05/2004 00:00:01.
    Coming to the formula now, for Time, first convert it to total seconds from midnight. E.g., 5:15:07pm would be (17*60*60) + (15*60) + 7 = 62107 seconds total since midnight. To get the Lookout's decimal part, divide this by 86400.
    62107/86400 = 0.71883102
    Therefore, 38022.71883102 would now give 02/05/2004 17:15:07. Computing Time is relatively easy.
    For the Date -- which is more complicated-- you could keep track of the total number of days either from 01/01/1900, or better still, a more recent day, like say 12/31/2003, which corresponds to 37986. To this reference you will keep adding 1 for each additional day to get the number for the current day. Note, you will have to accomodate leap years (Feb. 29th of this year, for instance).
    It's very helpful to have the reference day as the last day of the past year. That can be derived by counting the number of days since 01/01/1900 as follows:
    104 years * 365 days = 37960;
    + 1 day for each leap year
    A leap year is a year divisible by 4 (and 400 if the year ends with two zeros). There were 26 leap years from 1900 till 2003.
    So, 37960 + 26 = 37986. 12/31/2003 is thus represented by 37986.
    To get the integer for the Current Date we would first find what day of the year it is. Then add it to the reference day. Feb 5th, is the 36th day of the year. Adding this to 37986, gets us 38022.
    In your case you will have to come up with the correct day of the year using registers 40002 and 40003. Not sure if this helped or confused you more.
    I tried
    Khalid

  • Is it possible to create a formula that converts a resource hours into full time units in project server 2010

    Hi
    Is it possible to create a formula that converts a resource available hours into full time equivalent units in project server 2010? Say a resource has 160 available hours for any given month this will translate into 1 FTE for this month. If it is 80 hours
    for that month then it will be 0.5 FTE and so on and so forth.
    Thanks,
    -Maurizio

    Maurizio,
    It's a bit late, but there are two OLAP cubes that can provide you with this information in a pivot table in Project Server 2010.
    "MSP_Portfolio_Analyzer" and "Resource Timephased" contains capacity measures that be used to provide calculated measures when the cube database is generated. You change OLAP cube configuration in "Server Settings -> Database Administration -> OLAP
    Database Management". In either of the aforementioned cubes, use "Calculated Measures" to create two measures:
    Member Name
    MDX Expression
    Available (FTE)
    ([capacity]-[work])/[capacity]
    Work (FTE)
    [Work]/[Capacity]
    These two fields will appear in the pivot table field list as "Values", and when combined with a "Time" column, can give you a picture of FTE usage and availability.
    I prefer the portfolio version since it contains project/assignment data and resource data, letting you see just  how resources are being utilized.
    One thing I have not been able to get around is getting ""Maximum Units" for a resource factored into the measure. A common practice is to allocate more that "100%" to generic resources to represent teams for planning purposes. The OLAP measures will show
    only 0.0 to 1.0 FTE for any resource, even if a resource represents more than one body.
    If you have an SSRS query you could share, I would appreciated it!
    Hope this helps!
    JTC
    JAckson T. Cole, PMP, MCITP

  • Date formula variable with replacement path.

    Hi ,
    I have date formula variable with replacement path.
    Variable pop up with date format yyyymmdd. but i want dd.mm.yyyy.
    I have checked my user profile setting and it is dd.mm.yyyy.
    Can u please suggest it .
    Thanks
    Pramod

    Thanks for the rely , but basically i need a variable only for selection.
    thats why i have created formula variable processing my cutomer exit.
    But i think customre exit variable comes with text format .
    any1 has an idea for the same.
    Thanks
    Babu

  • Internal table data 1E2 automatically convert to scientific format

    Dear all,
    I have been searched for solution moths from the forums and tried all possible methods, but still no way to solve my above problem.  I found a way to solve it partially for us, but may be very helpful for others who meet similly case like mine, so I posted here.
    my problem is when I export my internal table data to Excel, the Cell data with 1E2 auto becomes 1.00E02, and 1E8 becomes 1.00E08, we need it to be 1E2 and 1E8 in excel.
    you can recreate my problem by
    1,  input 1E2 into your Microsoft Excel, then Enter, it will auto change into scientific format. which is we do not want.
    2, use any of your SAP system open any table as long as there is a Char (>3) field in that table. add some
    data entry in that field in the form "any amount (<15) of numeric 1 to 9"E"any one or two numeric 1 to 9". such as, 123E2, 1234E12 etc. then save this table's data to local file spread sheet, or use any FM to download it to a Excel file, when you open this
    file by Excel, the cell with above form will display as scientific. but
    if you put three or more numeric after the "E", such as 123E123 it will
    display correctly.
    what I have done:
    I searched in SCN for similar thread:
        Export to Excel 2007 - item number problem
        Exceding the limit of numbers in Excel at target side
        Excel download cell format problem
        Formating as Text in excel through SAP
        Converting of amount field into excel file through GUI DOWNLOAD
        Data downloaded to excel gets converted to exponential format.
        Problem with Excel download   and scientific number
        Re: Issue in displaying numbers in Excel?
        CSV Flat File Data Problem (Number converting to Scientific Notation)
    Tested accordingly, But none of these works in our case. because our
    ultimate receiver of email attachment will be external third party, we cannot ask
    them to change anything in their Excel.
    Search Microsoft help about Excel, http://support.microsoft.com/kb/214233,
    and it says this "Automatic Number Formatting" is a normal behaviour of excel.
    no way to turn it off, the "work-around" way that Microsoft provides is not suitable for our
    case.
    We test CL_iXML recently arrording to weblog http://wiki.sdn.sap.com/wiki/display/Snippets/FormattedExcelasEmailAttachment
    it successful controled the format. so this could be a solution for others whose internal table size is small. but our 2MB internal table bocome 6MB when converted to xml file attachment, which cannot be received by our end user's mail box. too big.
    So please advise your ideas.
    Many thanks in advance!
    Peter Ding
    Thank you very much for your time!

    Hi,
    You can achieve this by describing the spreadsheet in XML with the help of the DOM classes.
    The later releases of Excel can read and save spreadsheets as XML, providing your release supports this you can achieve it.
    Check out the following Wiki
    [Excel - XML|https://www.sdn.sap.com/irj/sdn/wiki?path=/display/abap/exporting%2bdata%2bto%2bexcel%2b-%2bxml%2bto%2bthe%2brescue]
    Regards,
    Darren

  • Date Difference between to date formula variable

    Hi Expert,
                    I have create two formula variable one for Document Date and another one for Goods reciept date
    and through formula variable I am subtracting these two formula variable and getting the no. of days between
    document date and GR date.
    This Shows me the correct value for one document date because i am filtering my query according to document
    date,
    while i am giving the date range for document date is shows me incorrect result. bucause document date formula
    variable contains only one date.
    Eg. i am giving the document date range like 01.02.2010 - 28.02.2010.
          In document date formula variable it contains only 01.02..2010 and GR date formula variable it contain correct
    value, thats why the date difference is incorrect because those PO which has PO date like 12.02.2010 for that Doc
    formula variable bring the same date like 01.02.2010.
    Please tell me the solution
    Thanks and Regards
    Lalit Kumar

    Hi Expert,
                     Actually i have created two formula variable on for PO date and another for GR date
    and i've restrict the query through PO date.
    while i am taking the single PO date in Selection parameter it showing me correct difference
    eg: Selection Parameter for PO: 01.01.2010
    But while i am taking the date interval for PO date
    eg: 01.01.2010-30.01.2010
    PO No: XXXXX123 , Doc date: 01.01.2010 GR date: 7.01.2010 then date difference is : 6
    PO No: XXXXX432, Doc date: 03.01.2010 GR date: 8.01.2010 then date difference is : 7 but it is 5
    Thanks and Regards
    Lalit Kumar

  • Creating a Fiscal Date formula

    I have created a Crystal Report and wrote a formula that allowed me to match my database entries to my fiscal months.  However, my subsequent year to date formula based off my month to date formula will only bring in current month data.  It won't bring in previous month data.  Is there an easy method within Crystal Reports to set the MonthtoDate function to a fiscal month?  Or a formula that will use the MonthtoDate function based on a fiscal month rather than a calendar month?

    Ian,
    Formula below selects the cost to use for the current month costs.  It works well.
    if ({@Cur_Mon})= "January" then {COST.TOTAL}
    else if ({@Cur_Mon}) = "February" then {COST.TOTAL}
    else if ({@Cur_Mon}) = "March" then {COST.TOTAL}
    else if ({@Cur_Mon}) = "April" then {COST.TOTAL}
    else if ({@Cur_Mon}) = "May" then {COST.TOTAL}
    else if ({@Cur_Mon}) = "June" then {COST.TOTAL}
    else if ({@Cur_Mon}) = "July" then {COST.TOTAL}
    else if ({@Cur_Mon}) = "August" then {COST.TOTAL}
    else if ({@Cur_Mon}) = "September" then {COST.TOTAL}
    else if ({@Cur_Mon}) = "October" then {COST.TOTAL}
    else if ({@Cur_Mon}) = "November" then {COST.TOTAL}
    else if ({@Cur_Mon}) = "December" then {COST.TOTAL}
    Formula below creates "Cur_Mon".  Selects the dates that the costs were incurred correctly into the fiscal month.
    if {@Fiscal_Month}in DateTime(2011, 01, 01, 0,0,0) to DateTime(2011, 01, 29, 0, 0, 0)
    then "January"
    else if {@Fiscal_Month} in DateTime(2011, 01, 30, 0, 0, 0) to DateTime(2011, 03, 05, 0, 0, 0)
    then "February"
    else if {@Fiscal_Month} in DateTime(2011, 03, 06, 0, 0, 0) to DateTime(2011, 04, 02, 0, 0, 0)
    then "March"
    else if {@Fiscal_Month} in DateTime(2011, 04, 03, 0, 0, 0) to DateTime(2011, 04, 30, 0, 0, 0)
    then "April"
    else if {@Fiscal_Month} in DateTime(2011, 05, 01, 0, 0, 0) to DateTime(2011, 06, 04, 0, 0, 0)
    then "May"
    else if {@Fiscal_Month} in DateTime(2011, 06, 05, 0, 0, 0) to DateTime(2011, 07, 02, 0, 0, 0)
    then "June"
    else if {@Fiscal_Month} in DateTime(2011, 07, 03, 0, 0, 0) to DateTime(2011, 07, 30, 0, 0, 0)
    then "July"
    else if {@Fiscal_Month} in DateTime(2011, 07, 31, 0, 0, 0) to DateTime(2011, 09, 03, 0, 0, 0)
    then "August"
    else if {@Fiscal_Month} in DateTime(2011, 09, 04, 0, 0, 0) to DateTime(2011, 10, 01, 0, 0, 0)
    then "September"
    else if {@Fiscal_Month} in DateTime(2011, 10, 02, 0, 0, 0) to DateTime(2011, 10, 29, 0, 0, 0)
    then "October"
    else if {@Fiscal_Month} in DateTime(2011, 10, 30, 0, 0, 0) to DateTime(2011, 12, 03, 0, 0, 0)
    then "November"
    else if {@Fiscal_Month} in DateTime(2011, 12, 04, 0, 0, 0) to DateTime(2011, 12, 31, 0, 0, 0)
    then "December"
    else "Frog-guts"
    Fiscal_Month actually compares two date fields in the database and uses the one which is not empty.
    The formula below is my "Year to Date" formula.  I've tried several different ways to write it, but it just mimmicks my current month formula.
    In the end is just is a simpler way to write my first formula above.  How can I make my year to date formula add all the costs that have occured to date?
    if ({@Cur_Mon}in ["January", "February","March","April","May","June","July","August","September",
    "August","October","November","December"]) then {COST.TOTAL}

  • My iphone has expiry date of 27 january 2015 .. plz tell me will it be covered under warranty on 27 jan or not??

    my iphone has expiry date of 27 january 2015 .. plz tell me will it be covered under warranty on 27 jan or not??

    Go to https://selfsolve.apple.com/.  What does it is say the last day of your coverage?

  • Error occurred while data was being converted.

    hi all,
    i am gettting a run-time error (dump) in this line of code,
                netval = wa_tb_str_ekpo-ktmng  *  wa_tb_str_ekpo-netpr.
    ktmng is data type QUAN and has reference field MEINS of EKPO table
    while netpr is data type CURR and has reference field WAERS of EKKO table.
    ABAP ERROR ANALYSIS SAYS :
    Error occurred while data was being converted.
    Please help me.
    Thanks.

    hi prasad,
                 you  can pass this value to the char field. then pass it to the field. and let me know the result.
    regards,
    venkat.

  • Posting date/period 31.12.2014/009 is earlier than existing date/period 17.01.2015/010

    Hi Experts
    While posting of invoice document (T.Code MIRO) I got the below error message;
    Posting date/period 31.12.2014/009 is earlier than existing date/period 17.01.2015/010
    Message no. FI_E050
    Diagnosis
    Commitment postings to Funds Management require that the current transaction's posting date is earlier than the posting date of the original or change account assignment line item of the document.
    I have checked several threads still i am not able to get answer -Invoice posting Error
    Regards
    Sp

    Suraj,
    please check following note
    564439 - FM update date is earlier than an existing postings
    Regards

  • Numbers Equivalent of Excel Formula for Converting HH:MM:SS to DD:HH:MM:SS

    I am not sure if this has been asked before.
    What would be the Numbers formula for converting HH:MM:SS to DD:HH:MM:SS?  The Excel formula is entering 396:59:45 into a cell and then in another cell is the following =TEXT(A2,"dd:hh:mm:ss").  The A2 is the example cell.

    There is no formula to actually do the conversion. It is a matter setting the cell format. After that all you need to do is add a simple =<cell> formula to get the value in (i.e. - see my previous post), or a formula to add the two values (=A2+A5). Use Duration rather then Time for the cell formats.
    A duration in Numbers for iOS will not appear 10:16:25:03, it will display as 10d 16h 25m 03s. If it is the actual display punctuation you are trying to change, it may be possible using a combination of a Duration and TEXT functions but would be quite lengthy, convoluted, and more trouble than it is worth.

  • How do I stop Numbers formulas from converting (/) into (÷) for hyperlinks. Ref Ver. 3.5.2

    How do I stop Numbers formulas from converting ( / ) forward slash into (÷) divide for hyperlinks. Ref Ver. 3.5.2
    I am trying to hyperlink to a dropbox url, but the numbers formula is automatically converting / into ÷, preventing the links from working.
    Thank you.

    Hi Merritt.B,
    If you are using HYPERLINK() everything goes inside quotes:
    HYPERLINK("https://discussions.apple.com/thread/6772428","This question")
    quinn

  • Formula to convert Hex to Decimal

    Hello All,
    I have "upgraded" from AppleWorks to iWork Numbers. Yes I've read all about how somethings didn't get ported over, etc. What I need is a formula to convert base 16 to base 10. Any ideas how to do this? I see that numbers has a formula editor so is it possible to make up a conversion formula? Someone done this who would like to share?
    Thanks,
    Dan

    Dan,
    Here's a brute-force solution. There may be more elegant ones out there.
    DEC formula is: =IF(ISERROR(LOOKUP(MID(A2, 1, 1), LOOKUP TBL :: A$1:A$16, LOOKUP TBL :: B$1:B$16) * 16^3+LOOKUP(MID(A2, 2, 1), LOOKUP TBL :: A$1:A$16, LOOKUP TBL :: B$1:B$16) * 16^2+LOOKUP(MID(A2, 3, 1), LOOKUP TBL :: A$1:A$16, LOOKUP TBL :: B$1:B$16) * 16+LOOKUP(MID(A2, 4, 1), LOOKUP TBL :: A$1:A$16, LOOKUP TBL :: B$1:B$16)),"", LOOKUP(MID(A2, 1, 1), LOOKUP TBL :: A$1:A$16, LOOKUP TBL :: B$1:B$16) * 16^3+LOOKUP(MID(A2, 2, 1), LOOKUP TBL :: A$1:A$16, LOOKUP TBL :: B$1:B$16) * 16^2+LOOKUP(MID(A2, 3, 1), LOOKUP TBL :: A$1:A$16, LOOKUP TBL :: B$1:B$16) * 16+LOOKUP(MID(A2, 4, 1), LOOKUP TBL :: A$1:A$16, LOOKUP TBL :: B$1:B$16))
    Be sure to Format Col A of both tables to Text.
    Regards,
    Jerry

  • DATE formula bug

    Hello everyone,
    As i said in subject, I have a problem with a DATE formula. It's funny I think but it may be a little problem in the future. My date which should be ok is not. Year and month is ok but day is tricky because I have to put an expression after a DAY (-2). If I don't a date is 2 days later from the one that I want to make. If anybody can help me fix this I really appreciate that.
    Thanks in advance.
    Message was edited by: adpa15

    Is it so tiring to read carefully the available resources ?
    As you may see, Apple took time to give us the needed infos.
    Given what we may read in the forums, it seems that users are more often buggued than the applications themselves
    Yvan KOENIG (VALLAURIS, France) vendredi 19 mars 2010 19:28:43

Maybe you are looking for