Spanish [SOLUCIONADO] Como obtener el Mes en número (no el nombre)

Discussion in 'Spanish Forum' started by desof, Jun 30, 2017.

  1. desof

    desof Well-Known Member Licensed User

    Hola esto me devuelve el dia

    dia =DateTime.GetDayOfMonth(fecha)

    Pero necesito que me devuelva el número de mes en curso ejemplo 7 (Julio)

    Hay alguna funcion nativa o tengo que hacer cálculos?
     
  2. rscheel

    rscheel Well-Known Member Licensed User

    Hola estimado es bastante sencillo, saludos.

    Code:
    DateTime.GetMonth(DateTime.Now)
     
  3. desof

    desof Well-Known Member Licensed User

    ahh !! gracias !!!
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice