ASP/DataGrid/BoundColumn/Data formatting expression fo Date?

Discussion in 'ASP .Net' started by Volodymyr Lozovoy, Dec 9, 2004.

  1. Hi All,

    who suggest why subj do not affect on displayed result for date?
     
    Volodymyr Lozovoy, Dec 9, 2004
    #1
    1. Advertising

  2. Because you are likely making mistakes.

    Eliyahu

    "Volodymyr Lozovoy" <> wrote in message
    news:...
    > Hi All,
    >
    > who suggest why subj do not affect on displayed result for date?
    >
    >
     
    Eliyahu Goldin, Dec 9, 2004
    #2
    1. Advertising

  3. I think so :)
    but where?

    Data format expression is {0:d}- short date format "05/06/04" (it is wrote
    in help "Properties for Bound Columns"), but date is rendered as May 6 2004.


    "Eliyahu Goldin" <> ÓÏÏÂÝÉÌ/ÓÏÏÂÝÉÌÁ ×
    ÎÏ×ÏÓÔÑÈ ÓÌÅÄÕÀÝÅÅ: news:...
    > Because you are likely making mistakes.
    >
    > Eliyahu
    >
    > "Volodymyr Lozovoy" <> wrote in message
    > news:...
    >> Hi All,
    >>
    >> who suggest why subj do not affect on displayed result for date?
    >>
    >>

    >
    >
     
    Volodymyr Lozovoy, Dec 9, 2004
    #3
  4. If you look in the help for BoundColumn.DataFormatString, you will find that
    D (or d) displays numeric values in decimal format. It shouldn't affect date
    fields, which is what you are observing.

    You can format dates in code-behind in either ItemDataBound or PreRender
    event. Get the cell text, convert it to DateTime and format it back to
    string with format expression of your choice.

    Eliyahu

    "Volodymyr Lozovoy" <> wrote in message
    news:...
    > I think so :)
    > but where?
    >
    > Data format expression is {0:d}- short date format "05/06/04" (it is wrote
    > in help "Properties for Bound Columns"), but date is rendered as May 6

    2004.
    >
    >
    > "Eliyahu Goldin" <> ÓÏÏÂÝÉÌ/ÓÏÏÂÝÉÌÁ ×
    > ÎÏ×ÏÓÔÑÈ ÓÌÅÄÕÀÝÅÅ: news:...
    > > Because you are likely making mistakes.
    > >
    > > Eliyahu
    > >
    > > "Volodymyr Lozovoy" <> wrote in message
    > > news:...
    > >> Hi All,
    > >>
    > >> who suggest why subj do not affect on displayed result for date?
    > >>
    > >>

    > >
    > >

    >
    >
     
    Eliyahu Goldin, Dec 9, 2004
    #4
  5. I am newbie in .NET. May be i am wrong.
    I agree with you about numeric value, but i have date value.
    In the help for Standard DateTime Format Strings "d" is short date pattern.


    "Eliyahu Goldin" <> ÓÏÏÂÝÉÌ/ÓÏÏÂÝÉÌÁ ×
    ÎÏ×ÏÓÔÑÈ ÓÌÅÄÕÀÝÅÅ: news:...
    > If you look in the help for BoundColumn.DataFormatString, you will find
    > that
    > D (or d) displays numeric values in decimal format. It shouldn't affect
    > date
    > fields, which is what you are observing.
    >
    > You can format dates in code-behind in either ItemDataBound or PreRender
    > event. Get the cell text, convert it to DateTime and format it back to
    > string with format expression of your choice.
    >
    > Eliyahu
    >
    > "Volodymyr Lozovoy" <> wrote in message
    > news:...
    >> I think so :)
    >> but where?
    >>
    >> Data format expression is {0:d}- short date format "05/06/04" (it is
    >> wrote
    >> in help "Properties for Bound Columns"), but date is rendered as May 6

    > 2004.
    >>
    >>
    >> "Eliyahu Goldin" <> ÓÏÏÂÝÉÌ/ÓÏÏÂÝÉÌÁ ×
    >> ÎÏ×ÏÓÔÑÈ ÓÌÅÄÕÀÝÅÅ: news:...
    >> > Because you are likely making mistakes.
    >> >
    >> > Eliyahu
    >> >
    >> > "Volodymyr Lozovoy" <> wrote in message
    >> > news:...
    >> >> Hi All,
    >> >>
    >> >> who suggest why subj do not affect on displayed result for date?
    >> >>
    >> >>
    >> >
    >> >

    >>
    >>

    >
    >
     
    Volodymyr Lozovoy, Dec 9, 2004
    #5
  6. .... even if I use format {0:dd-MM-yy} nothing changes.

    "Volodymyr Lozovoy" <> ÓÏÏÂÝÉÌ/ÓÏÏÂÝÉÌÁ × ÎÏ×ÏÓÔÑÈ
    ÓÌÅÄÕÀÝÅÅ: news:...
    >I am newbie in .NET. May be i am wrong.
    > I agree with you about numeric value, but i have date value.
    > In the help for Standard DateTime Format Strings "d" is short date
    > pattern.
    >
    >
    > "Eliyahu Goldin" <> ÓÏÏÂÝÉÌ/ÓÏÏÂÝÉÌÁ ×
    > ÎÏ×ÏÓÔÑÈ ÓÌÅÄÕÀÝÅÅ: news:...
    >> If you look in the help for BoundColumn.DataFormatString, you will find
    >> that
    >> D (or d) displays numeric values in decimal format. It shouldn't affect
    >> date
    >> fields, which is what you are observing.
    >>
    >> You can format dates in code-behind in either ItemDataBound or PreRender
    >> event. Get the cell text, convert it to DateTime and format it back to
    >> string with format expression of your choice.
    >>
    >> Eliyahu
    >>
    >> "Volodymyr Lozovoy" <> wrote in message
    >> news:...
    >>> I think so :)
    >>> but where?
    >>>
    >>> Data format expression is {0:d}- short date format "05/06/04" (it is
    >>> wrote
    >>> in help "Properties for Bound Columns"), but date is rendered as May 6

    >> 2004.
    >>>
    >>>
    >>> "Eliyahu Goldin" <> ÓÏÏÂÝÉÌ/ÓÏÏÂÝÉÌÁ ×
    >>> ÎÏ×ÏÓÔÑÈ ÓÌÅÄÕÀÝÅÅ: news:...
    >>> > Because you are likely making mistakes.
    >>> >
    >>> > Eliyahu
    >>> >
    >>> > "Volodymyr Lozovoy" <> wrote in message
    >>> > news:...
    >>> >> Hi All,
    >>> >>
    >>> >> who suggest why subj do not affect on displayed result for date?
    >>> >>
    >>> >>
    >>> >
    >>> >
    >>>
    >>>

    >>
    >>

    >
    >
     
    Volodymyr Lozovoy, Dec 9, 2004
    #6
  7. Do i understand right that all data is in text format?

    "Eliyahu Goldin" <> ÓÏÏÂÝÉÌ/ÓÏÏÂÝÉÌÁ ×
    ÎÏ×ÏÓÔÑÈ ÓÌÅÄÕÀÝÅÅ: news:...
    > If you look in the help for BoundColumn.DataFormatString, you will find
    > that
    > D (or d) displays numeric values in decimal format. It shouldn't affect
    > date
    > fields, which is what you are observing.
    >
    > You can format dates in code-behind in either ItemDataBound or PreRender
    > event. Get the cell text, convert it to DateTime and format it back to
    > string with format expression of your choice.
    >
    > Eliyahu
    >
    > "Volodymyr Lozovoy" <> wrote in message
    > news:...
    >> I think so :)
    >> but where?
    >>
    >> Data format expression is {0:d}- short date format "05/06/04" (it is
    >> wrote
    >> in help "Properties for Bound Columns"), but date is rendered as May 6

    > 2004.
    >>
    >>
    >> "Eliyahu Goldin" <> ÓÏÏÂÝÉÌ/ÓÏÏÂÝÉÌÁ ×
    >> ÎÏ×ÏÓÔÑÈ ÓÌÅÄÕÀÝÅÅ: news:...
    >> > Because you are likely making mistakes.
    >> >
    >> > Eliyahu
    >> >
    >> > "Volodymyr Lozovoy" <> wrote in message
    >> > news:...
    >> >> Hi All,
    >> >>
    >> >> who suggest why subj do not affect on displayed result for date?
    >> >>
    >> >>
    >> >
    >> >

    >>
    >>

    >
    >
     
    Volodymyr Lozovoy, Dec 9, 2004
    #7
  8. Thank you! I found my mistake.

    "Eliyahu Goldin" <> ÓÏÏÂÝÉÌ/ÓÏÏÂÝÉÌÁ ×
    ÎÏ×ÏÓÔÑÈ ÓÌÅÄÕÀÝÅÅ: news:...
    > If you look in the help for BoundColumn.DataFormatString, you will find
    > that
    > D (or d) displays numeric values in decimal format. It shouldn't affect
    > date
    > fields, which is what you are observing.
    >
    > You can format dates in code-behind in either ItemDataBound or PreRender
    > event. Get the cell text, convert it to DateTime and format it back to
    > string with format expression of your choice.
    >
    > Eliyahu
    >
    > "Volodymyr Lozovoy" <> wrote in message
    > news:...
    >> I think so :)
    >> but where?
    >>
    >> Data format expression is {0:d}- short date format "05/06/04" (it is
    >> wrote
    >> in help "Properties for Bound Columns"), but date is rendered as May 6

    > 2004.
    >>
    >>
    >> "Eliyahu Goldin" <> ÓÏÏÂÝÉÌ/ÓÏÏÂÝÉÌÁ ×
    >> ÎÏ×ÏÓÔÑÈ ÓÌÅÄÕÀÝÅÅ: news:...
    >> > Because you are likely making mistakes.
    >> >
    >> > Eliyahu
    >> >
    >> > "Volodymyr Lozovoy" <> wrote in message
    >> > news:...
    >> >> Hi All,
    >> >>
    >> >> who suggest why subj do not affect on displayed result for date?
    >> >>
    >> >>
    >> >
    >> >

    >>
    >>

    >
    >
     
    Volodymyr Lozovoy, Dec 9, 2004
    #8
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Andrea Williams

    BoundColumn Formatting question

    Andrea Williams, May 6, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    586
    Andrea Williams
    May 7, 2004
  2. Yunus Emre ALPÖZEN [MCAD.NET]
    Replies:
    1
    Views:
    716
  3. =?Utf-8?B?Q2hhcmxlc0E=?=

    boundcolumn formatting question

    =?Utf-8?B?Q2hhcmxlc0E=?=, Feb 2, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    403
    =?Utf-8?B?Q2hhcmxlc0E=?=
    Feb 2, 2006
  4. Peter Grison

    Date, date date date....

    Peter Grison, May 28, 2004, in forum: Java
    Replies:
    10
    Views:
    3,300
    Michael Borgwardt
    May 30, 2004
  5. mesut
    Replies:
    0
    Views:
    581
    mesut
    Jun 29, 2007
Loading...

Share This Page