Field Date year and month

Hi, 
I'd like to get only year and month field. E.g. 201409.
Could you please let me know how to do it?
ddwrt:FormatDate(ddwrt:Today(),0804,1)
Thank you. 

Hi Denis - Can you use like:
formatted date "=TEXT(pickdate,"m") & "/" & YEAR(pickdate)"
http://weekbeforenext-blog.blogspot.in/2011/06/extracting-month-and-year-from-date-and.html
-prs

Similar Messages

  • Query to select value for max date from a varchar field containing year and month

    I'm having trouble selecting a value from a table that contain a varchar column in YYYY-MM format. 
    ex.
    Emp_id Date Cost
    10264 2013-01 5.00
    33644 2013-12 84.00
    10264 2013-02 12.00
    33644 2012-01 680.0
    59842 2014-05 57.00
    In the sample data above, I would like to be able to select the for each Emp_id by the max date. Ex. For Emp_id 10264, the cost should be 12.00.

    create table test (Emp_id int, Date varchar(10), Cost decimal (6,2))
    insert into test values(
    10264, '2013-01', 5.00 ),
    (33644, '2013-12', 84.00 ),
    (10264, '2013-02', 12.00 ),
    (33644, '2012-01', 680.0 ),
    (59842, '2014-05', 57.00 )
    Select Emp_id,[Date],Cost FROM (
    select *,row_number() Over(Partition by Emp_id Order by Cast([Date]+'-1' as Datetime) Desc) rn
    from test)
    t
    WHERE rn=1
    drop table test

  • How to add a new metadata field to iPhoto where new field is calculated as age in years and month based on a specific date and the date photo was taken ? I want to calculate and display the age of my two kids on every photo.

    Hi
    How can I add 2 new metadata-fields to every photo in iPhoto ?
    The new fields should state the age of my kids in years and months based on the date that they were born and the date that photo is taken.
    Exampel:
    My son is born 01.01.2010
    My daughter is born 01.01.2012
    Photo taken by data
    Aage of son
    Aage of daughter
    01.07.2011
    1 year 6 month
    not born yet
    01.01.2014
    4 year 0 month
    2 year 0 month
    I would like to be able to search by kids age and get the info displayed when doing slideshows.
    How to do this in iPhoto ?
    Any alternatives to accomplish the same ?
    Kind regards

    It can't be done with iPhoto.  There are some DAM (digital asset management) applications that can write to other IPTC fields that iPhoto can't read. One such app is Media Pro 1.
    However you would have to calculate the age for each date and add it to one of the fields. There are online age calculators that can do that for you: Age Calculators
    If you go thru that much trouble then use iPhoto, make the calculations and add the age to the Description field.  Then you can use Smart Albums to search for 1year 6 month text.
    OT

  • Extract Data Based on Year and Month

    My clients have taken an Oracle DB TimeStamp field and
    downloaded it to Access in a TEXT field format.
    Sample data: 20060401001348CS
    All I am trying to do is extract data based on year and
    month. I have equal to 200604*, 200604%. Have also tried to used
    LIKE.
    Nothing works. It just can't be that dificult. Please help.
    Thanks

    After breaking my inquiry down into bits and pieces the
    problem is not just the LIKE, it is a combination of events. The
    entire picture is this:
    User selects Year from a drop down (2006), then selects month
    from drop down (04). I then build a variable called
    EventReport Date with the statement <cfset EventReportDate
    = Session.InquiryYear & Session.InquiryMonth & "%">
    It correctly displays as 200604% - When used by itself as
    below, it works just fine.
    WORKS
    <cquery name="GetEventCount" datasource="CountyDB">
    Select count(AD_ID) as EventCount, TYCOD, TYP_ENG, CURENT,
    CDTS
    FROM aeven
    WHERE CDTS LIKE '#EventReportDate#'
    Group By AG_ID, TYCOD, TYP_ENG, CURENT, CDTS
    </cfquery>
    WORKS (additional WHERE criteria)
    <cquery name="GetEventCount" datasource="CountyDB">
    Select count(AD_ID) as EventCount, TYCOD, TYP_ENG, CURENT,
    CDTS
    FROM aeven
    WHERE ((AG_ID = '#Session.InquiryAgencyCode#') AND (CURENT =
    'T'))
    Group By AG_ID, TYCOD, TYP_ENG, CURENT, CDTS
    </cfquery>
    FAILS **** There is something wrong with the combination of
    the WHERE clause items
    <cquery name="GetEventCount" datasource="CountyDB">
    Select count(AD_ID) as EventCount, TYCOD, TYP_ENG, CURENT,
    CDTS
    FROM aeven
    WHERE ((AG_ID = '#Session.InquiryAgencyCode#') AND (CURENT =
    'T')
    AND (CDTS LIKE '#EventReportDate#'))
    Group By AG_ID, TYCOD, TYP_ENG, CURENT, CDTS
    </cfquery>
    NOTE: There is not an error message, it just comes back with
    zero records.
    MORE LOST THAN EVER! Thanks for your help
    Ron

  • What is the best way to dynamically create table partition by year and month based on a date column?

    Hi,
    I have a huge table and it will keep growing. I have a date column in this table and thought of partition the table by year and month. Can any you suggest better approach so that partition will create automatically for new data also along with the existing
    data? Nothing but automatically/dynamically partition should create along with file group and partition files.
    Thanks in advance!
    Palash 

    Also this one
    http://weblogs.sqlteam.com/dang/archive/2008/08/30/Sliding-Window-Table-Partitioning.aspx
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • Album By Year -- and month? (Sorting when an artist has 2 albums in 1 year)

    I love having my music collection sorted by Artist and within Artist by Album by Year. This effectively presents each artists' entire catalogue as a set, with each album in the order of release date. Perfect.
    But what if an artist releases more than one album or single in a year?
    Then the sorting of Album by Year breaks down.
    Two albums in the same year appear to iTunes to have been released at exactly the same time. iTunes gives up, looks at the two albums' titles, and sorts them in alphabetical order. That's kind of lame.
    Is there some way to specify the year AND MONTH of release?
    I tried adding a decimal to the year field, figuring that would at least be close enough to get them in chronological order, but it won't accept more than 4 digits.
    The obvious workaround is to rename the albums, for example rename the second album with a "Z" so it will be forced into second place when iTunes gives up and goes alphabetical. Or, use entirely fake years. But neither workaround is proper.
    Is there any legitimate way to tell iTunes what to do?
    Gateway NX250X Windows XP Pro

    Hi, Will.
    But neither workaround is proper.
    Indeed.
    Is there any legitimate way to tell iTunes what to do?
    Unfortunately, as far as I know there is not so your workarounds seem like the best way of dealing with the situation - it's either that or eliminating artists who release more than one record in any given year from your Library. ; - )
    All I can suggest is you go to the man and let him know what you'd like to see in a future version of iTunes: http://www.apple.com/feedback/itunesapp.html

  • T:inputCalendar year and month only

    Hej there,
    I'd like to use t:inputCalendar to allow the user only to choose a certain year and month, so not including the day.
    I'm not sure if it's possible at all, but I started out using this:
    <t:inputCalendar renderAsPopup="true" popupSelectMode="month" popupDateFormat="MM" />
    So now the user has a button, but when s/he clicks on it, the full calendar is shown, including the days.
    How do I get rid of that?
    Thanks,
    David

    When you are not really using date, you might as well think of a different solution altogether.
    Probably you can have two separate drop-down lists for selecting the month and the year.
    DavidTarr wrote:
    Hej there,
    I'd like to use t:inputCalendar to allow the user only to choose a certain year and month, so not including the day.
    I'm not sure if it's possible at all, but I started out using this:It is possible to convert the pattern using convertDateTime. But this only converts the text field display.
    <f:convertDateTime type="date" pattern="MM-yy"/>
    <t:inputCalendar renderAsPopup="true" popupSelectMode="month" popupDateFormat="MM" />
    So now the user has a button, but when s/he clicks on it, the full calendar is shown, including the days.
    How do I get rid of that?I am not sure if you can get rid of that. Obviously, no body would expect to see a calendar without dates. It does not make much sense.
    >
    Thanks,
    David

  • Key Figure format in Years and Months..

    Hi,
    Is there any Key figure similar to 0SRVCLENKYF (Length of Service (in Years)) part of Headcount and Personnel Actions, which should give me value in Years and Months..?
    Thanks in Advance,
    Thanks,
    Madhu.

    For curiousity sake...if you use the FIMA_DECIMAL_MONTHS_AND_YEARS Function Module, the output that you'll get is a months and years in fractional amounts. So, how are you going to get the Years and Months from this?
    For example, if the from date is 20000101 and the to date is 20090914, the results from this Function Module will be Months = 116.42740 and Years = 9.70228. If you do use this, I'd suggest taking the whole number from passed value for years (9 in this example) and then calculate months by taking the franctional amount of the passed value for years and multiple it by 12 (0.70228 * 12), you end up with 9 Years, 8 Months (8.42736 to be exact, but you're going to want to truncate it to 8 so that when it goes above 8.5, the value doesn't become 9 when it still should be 8).

  • Year and Month calculation

    Hi
    I have created a report with two prompts, they are "Enter Start date:" and "Enter End date:" where i take date values from a calendar while prompting.
    For example:
    Start date = 10/11/2003
    End date = 10/10/2003
    If i want to display the End date means, i ll use UserResponse("Enter End Date:") in the webi reports. What should i do to calculate Year and Month from this user response value,
    i used these calculations below, but it is not working, showing me #ERROR message.
    1) ToDate(UserResponse("Enter End Date:");"dd/MM/yyyy")     =  #ERROR
    2) FormatDate(ToDate(UserResponse("Enter End Date:");"dd/MM/yyyy");"dd/MM/yyyy")     = #ERROR
    3) Year(UserResponse("Enter End Date:")   = The expression or sub-expression at position 6 in the 'Year' function uses an    invalid data type. (WIS 10037)
    4) FormatDate(ToDate(UserResponse("Enter End Date:");"dd/MM/yyyy  hh:mm:ss A");"MM/dd/yyyy") =#ERROR
    so help me how to get the year and month values from prompts ?
    Thanks
    Dineshkumar

    to get the Month Value and year value in Webi
    month name
    =Month(ToDate(UserResponse("Enter End Date:");""))
    month number of the year
    =MonthNumberOfYear(ToDate(UserResponse("Enter End Date:");""))
    to get the Year Value
    =Year(ToDate(UserResponse("Enter End Date:");""))
    good luck

  • Alpha numeric numer ranges for Shopping Cart based on year and month

    Dear All,
    My client requirement is that Shopping cart number should be generated based on year and month specific.
    Though it is possible through smart numbering, it should generate automaticaly.
    For eg:- Shopping cart generated for March 2011 should be  1103SC00001 to 1103SC99999
                  Shopping cart generated for June   2011 should be  1106SC00001 to 1106SC99999
                  Shopping cart generated for January 2012 should be  1201SC00001 to 1201SC99999
    Is thera any badi available for this.
    Regards,
    Raju

    why dont you add this to description field?

  • How to Get the numeric equivalent of Year and Month with this format....

    Hi Experts!
    I just would like to know how to get the numeric equivalent of the Year and Month if the given format is like this....
       31-May-07
    where:
    31 is the Day
    May is the Month
    07 is the Year
    Is there a function in ABAP to do this? I wouldn't mind hardcoding for the Month, but what I'm after is the year.... they only gave me 2 digits for the year... and I would like to extract 4 digits from it... do ABAP still recognize it as '1907'? I think not...
    Please help me on this experts and Thank you in Advance!!!
    More Power!

    Hi Jayson,
    You can require 2007 or 2017 or 2027..
    or 1937 . or 1947 .. so on,
    so just put a logic based on this. Just hard code as
    lets say value is 31-May-07 (9 char field)
    Case field+7(1).
    WHEn 0.
    concatenate '200' field+8(1) into year.
    WHEN 1.
    WHEN 2.
    WHEN 3.
    jsut code like this and check the syntaxes.
    Reward points if useful.
    Regards,
    Atish

  • FM takes year and month as input and give firstdate and lastdate as output

    Hi,
    Can any one tell me any <b>function modules which takes year and month as inputs and gives first date and last date of that month as outp</b>uts.
    Regards,
    Gurprit Bhatia
    Message was edited by:
            GURPRIT BHATIA

    Hi Gurprit,
    You can use this.
    data : ws_date type sy-datum.,
             ws_edtae type sy-datum.
    constants : c_01 value '01'.
    CONCATENATE ws_date c_01 INTO ws_stdate.
    CALL FUNCTION 'HR_JP_ADD_MONTH_TO_DATE'
          EXPORTING
            iv_monthcount = ws_01 (1)
            iv_date       = ws_stdate ( eg :01.01.2007)
          IMPORTING
            ev_date       = ws_edate. (eg : 31.01.2007)
    Reward if useful.
    Regards,
    Chitra

  • How to calculate year and month

    Dear Friends
    I have to make a customised report.In this report there are different buckets of one year from the year and month being entered by the user.
    For example if user is giving input value for year and month as 200912 then system has to show data in first bucket for the period 200912 to 200901.In the second bucket system will show data for period 200812 to 200801.In this way system has to show data in 11 buckets for 11 years.
    Is there any function module/BAPI in SAP through which system will calculate period of one year for different buckets for my report from the input value(year and month) being given by the user.
    Moderator message - Please see The specified item was not found. before posting - post locked and Points unassigned
    Edited by: Rob Burbank on Jan 5, 2010 11:03 AM

    Hi Satish,
    You can do this with a Standard function module.
    I am providing my code below :
    data : G_date type sy-datum.
    CALL FUNCTION 'RP_CALC_DATE_IN_INTERVAL'
        EXPORTING
          DATE      = sy-datum " instead of sy-datum provide
              " the select option here which user provides.
          DAYS      = C_fourty"45
          MONTHS    = C_MM    "00
          SIGNUM    = C_Negative "'-'
          YEARS     = C_YY    "00
        IMPORTING
          CALC_DATE = G_date. "G_date will have date less than 45 days
    *                         " from the day program has been executed.
    Now based upon the G_DATE, we can fetch remaining 10 buckets.
    Regards,
    Kittu
    Edited by: Rob Burbank on Jan 5, 2010 11:01 AM

  • How to capture the presnt year and month  .Urgent!!

    Hi all,
    I need to take the present year and month from the system and have to populate in drodownlists. can any one help me how to get these two seperatly and populate. xxxxxx (please read forum rules)
    regards,
    Sharan
    Edited by: Armin Reichert on Jan 17, 2008 10:23 AM

    Hi,
        If you are using DropDownByKey UI elements:
    1. Let's say the context attributes bound to the selectedKey property are called year and month respectively.
    2. To populate year:
    Date current = new Date(System.currentTimeMillis());
    IWDAttributeInfo attinfo                  = wdContext.getNodeInfo().getAttribute(IContextElement.YEAR);
    ISimpleTypeModifiable modinfo       = attinfo.getModifiableSimpleType();
    IModifiableSimpleValueSet valset   = modinfo.getSVServices().getModifiableSimpleValueSet();
    valset.put("currYear",String.valueOf(current.getYear));
    3. You can do a similar thing for month.
    Regards,
    Satyajit.

  • Calculating Years and Months

    I want to have a field that will calculate out the years and months a person has been employed at my business.  I know the calculations for getting the years is:
    if (HasValue(dob)) then
              var currDate_ = Date2Num(currDate.formattedValue, "MM/DD/YYYY")
              var dob_ = Date2Num(dob.formattedValue, "MM/DD/YYYY")
              var diff = currDate_ - dob_
              $.rawValue = Floor(diff / 365.25)
    else
              $.rawValue = null
    endif
    I want to  find it put out so it says 5 years 3 months if that is possible, or something close to that.

    var intYears = Floor(diff / 365.25)
    var intMonths = Floor((diff - (intYears * 365.25)) / 30.4375)
    var strOutput = Concat(intYears, " years, ", intMonths, " months")
    xfa.host.messageBox(strOutput);

Maybe you are looking for

  • How to retrieve site passwords from DW v 8

    I had Dreamweaver 8 installed on an Windows XP Pro SP2 system that no longer boots. That configuration had the FTP addresses and passwords of my web sites, some of which I can no longer find or figure out (iComcast has switched to an entirely new sys

  • How to download list item attachment from display.aspx

    Im uploading documents to list item in list by using file upload control. Now I should download that file. I can able to insert documents into list item in attachment column which is predefined but am how can I download the attachments by clicking on

  • MRP MD04 - message 15 Postpone the process

    Hello Experts, In md04 it is falling into exception and postponing the planned lead time to  open sales order.... we want delivery date as per planned lead time ...i guess system is considering dependant requirements and pushing date to open sales or

  • Login form using Access(JSP)....

    I have written the following code in JSP and connected to Access Database. Aftre i run the JSP from browser the Login form is displayed. but aftre i enter the "userid" and "password" nothing hapens. the application is STUCK !! <HTML> <HEAD> <TITLE> L

  • Apps shutting down when four or more open

    Sounds like the old days. Moved from an old G4 to a new Mac Pro. Installed my apps from the old system into the new from the install disks. Only moved files from the old system. Noticed today that my apps will not open when there is more than four op