none
How to Convert Month Name to Month Number in Sharepoint?

    Pertanyaan

  • Hi,

    I have data:-

    June 23 2010

     

    Desired Result :-

    06 23 2010

     

    Any help?

    Thanks

    Regards,

    Kumar

    • Dipindahkan oleh Mike Walsh FIN 25 Juni 2010 6:14 admin q (From:SharePoint - General Question and Answers and Discussion (pre-SharePoint 2010))
    24 Juni 2010 16:28

Jawaban

  • Hi Kumar,

    The following the info is from a post by

    Clare Stine http://abstractspaces.wordpress.com/2009/05/02/common-date-time-formulas-for-sharepoint-calculated-fields/

    Get Week of the year
    =DATE(YEAR([Start Time]),MONTH([Start Time]),DAY([Start Time]))+0.5-WEEKDAY(DATE(YEAR([Start Time]),MONTH([Start Time]),DAY([Start Time])),2)+1

    First day of the week for a given date:
    =[Start Date]-WEEKDAY([Start Date])+1

    Last day of the week for a given date:
    =[End Date]+7-WEEKDAY([End Date])

    First day of the month for a given date:
    =DATEVALUE(“1/”&MONTH([Start Date])&”/”&YEAR([Start Date]))

    Last day of the month for a given year (does not handle Feb 29). Result is in date format:
    =DATEVALUE (CHOOSE(MONTH([End Date]),31,28,31,30,31,30,31,31,30,31,30,31) &”/” & MONTH([End Date])&”/”&YEAR([End Date]))
    Day Name of the week : e.g Monday, Mon
    =TEXT(WEEKDAY([Start Date]), “dddd”)
    =TEXT(WEEKDAY([Start Date]), “ddd”)

    This may give you some ideas...

    -Ivan


    Ivan Sanders My LinkedIn Profile, My Blog, @iasanders.
    25 Juni 2010 3:32

Semua Balasan

  • You can either convert it programatically or you could set the date format for a date field in SharePoint and then assign the value you have to that field and taking the result value from that field.

     


    I trust that answers your question...

    Thanks
    C

    http://www.cjvandyk.com/blog
    24 Juni 2010 17:58
    Penjawab Pertanyaan
  • Hi Kumar,

    The following the info is from a post by

    Clare Stine http://abstractspaces.wordpress.com/2009/05/02/common-date-time-formulas-for-sharepoint-calculated-fields/

    Get Week of the year
    =DATE(YEAR([Start Time]),MONTH([Start Time]),DAY([Start Time]))+0.5-WEEKDAY(DATE(YEAR([Start Time]),MONTH([Start Time]),DAY([Start Time])),2)+1

    First day of the week for a given date:
    =[Start Date]-WEEKDAY([Start Date])+1

    Last day of the week for a given date:
    =[End Date]+7-WEEKDAY([End Date])

    First day of the month for a given date:
    =DATEVALUE(“1/”&MONTH([Start Date])&”/”&YEAR([Start Date]))

    Last day of the month for a given year (does not handle Feb 29). Result is in date format:
    =DATEVALUE (CHOOSE(MONTH([End Date]),31,28,31,30,31,30,31,31,30,31,30,31) &”/” & MONTH([End Date])&”/”&YEAR([End Date]))
    Day Name of the week : e.g Monday, Mon
    =TEXT(WEEKDAY([Start Date]), “dddd”)
    =TEXT(WEEKDAY([Start Date]), “ddd”)

    This may give you some ideas...

    -Ivan


    Ivan Sanders My LinkedIn Profile, My Blog, @iasanders.
    25 Juni 2010 3:32
  • Create a calculated field as Date \ Time.

    enter code: =TEXT([Month]&"/01/"&[Calendar Year],"YYYY/MM/DD")

    [Month] = Full month name ex:  "October"

    20 Juni 2012 12:46