Formatting Date

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

    Formatting Date

    Hi all, i need to return this line:
    return objPessoaFisica .datDataNascime nto

    But it's returning d/m/yyyy 00:00

    I just need: dd/mm/yyyy

    How do i do ?
  • Tom Porterfield

    #2
    Re: Formatting Date

    On Tue, 24 May 2005 23:04:20 -0300, Daniel Groh wrote:
    [color=blue]
    > Hi all, i need to return this line:
    > return objPessoaFisica .datDataNascime nto
    >
    > But it's returning d/m/yyyy 00:00
    >
    > I just need: dd/mm/yyyy
    >
    > How do i do ?[/color]

    What data type is datDataNascimen to? Do you want to return a DateTime
    object or a string? To format a DateTime as a string in the format you
    want, call its ToString method passing the appropriate format specifier.
    Ex:

    return objPessoaFisica .datDataNascime nto.ToString("d d/MM/yyyy");
    --
    Tom Porterfield

    Comment

    Working...