format date?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • LL

    #1

    format date?

    Hi,

    What is the correct syntax for format date like VB:

    Format(MyDateTi me, "YYYYMMDD")

    Thanks.




  • Mike McCann

    #2
    Re: format date?

    MyDateTime.ToSt ring("yyyyMMdd" ) and many, many variations; see
    DateTime.ToStri ng method in help.

    "LL" <lionelluo@hotm ail.com> wrote in message
    news:OBTv9mDwDH A.2464@TK2MSFTN GP12.phx.gbl...[color=blue]
    > Hi,
    >
    > What is the correct syntax for format date like VB:
    >
    > Format(MyDateTi me, "YYYYMMDD")
    >
    > Thanks.
    >
    >
    >
    >[/color]


    Comment

    • Ayende Rahien

      #3
      Re: format date?

      MyDateTime.ToSt ring ( "YYYYMMDD" )

      "LL" <lionelluo@hotm ail.com> wrote in message
      news:OBTv9mDwDH A.2464@TK2MSFTN GP12.phx.gbl...[color=blue]
      > Hi,
      >
      > What is the correct syntax for format date like VB:
      >
      > Format(MyDateTi me, "YYYYMMDD")
      >
      > Thanks.
      >
      >
      >
      >[/color]


      Comment

      Working...