Connecting Tech Pros Worldwide Forums | Help | Site Map

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

Volodymyr Lozovoy
Guest
 
Posts: n/a
#1: Nov 19 '05
Hi All,

who suggest why subj do not affect on displayed result for date?



Eliyahu Goldin
Guest
 
Posts: n/a
#2: Nov 19 '05

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


Because you are likely making mistakes.

Eliyahu

"Volodymyr Lozovoy" <vlozovoy@mail.ru> wrote in message
news:e6hOJEf3EHA.1404@TK2MSFTNGP11.phx.gbl...[color=blue]
> Hi All,
>
> who suggest why subj do not affect on displayed result for date?
>
>[/color]


Volodymyr Lozovoy
Guest
 
Posts: n/a
#3: Nov 19 '05

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


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" <removemeegoldin@monarchmed.com> сообщил/сообщила в
новостях следующее: news:OC2pfKf3EHA.2196@TK2MSFTNGP14.phx.gbl...[color=blue]
> Because you are likely making mistakes.
>
> Eliyahu
>
> "Volodymyr Lozovoy" <vlozovoy@mail.ru> wrote in message
> news:e6hOJEf3EHA.1404@TK2MSFTNGP11.phx.gbl...[color=green]
>> Hi All,
>>
>> who suggest why subj do not affect on displayed result for date?
>>
>>[/color]
>
>[/color]


Eliyahu Goldin
Guest
 
Posts: n/a
#4: Nov 19 '05

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


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" <vlozovoy@mail.ru> wrote in message
news:O8nMDhf3EHA.3316@tk2msftngp13.phx.gbl...[color=blue]
> 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[/color]
2004.[color=blue]
>
>
> "Eliyahu Goldin" <removemeegoldin@monarchmed.com> сообщил/сообщила в
> новостях следующее: news:OC2pfKf3EHA.2196@TK2MSFTNGP14.phx.gbl...[color=green]
> > Because you are likely making mistakes.
> >
> > Eliyahu
> >
> > "Volodymyr Lozovoy" <vlozovoy@mail.ru> wrote in message
> > news:e6hOJEf3EHA.1404@TK2MSFTNGP11.phx.gbl...[color=darkred]
> >> Hi All,
> >>
> >> who suggest why subj do not affect on displayed result for date?
> >>
> >>[/color]
> >
> >[/color]
>
>[/color]


Volodymyr Lozovoy
Guest
 
Posts: n/a
#5: Nov 19 '05

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


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" <removemeegoldin@monarchmed.com> сообщил/сообщила в
новостях следующее: news:eRq7auf3EHA.924@TK2MSFTNGP14.phx.gbl...[color=blue]
> 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" <vlozovoy@mail.ru> wrote in message
> news:O8nMDhf3EHA.3316@tk2msftngp13.phx.gbl...[color=green]
>> 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[/color]
> 2004.[color=green]
>>
>>
>> "Eliyahu Goldin" <removemeegoldin@monarchmed.com> сообщил/сообщила в
>> новостях следующее: news:OC2pfKf3EHA.2196@TK2MSFTNGP14.phx.gbl...[color=darkred]
>> > Because you are likely making mistakes.
>> >
>> > Eliyahu
>> >
>> > "Volodymyr Lozovoy" <vlozovoy@mail.ru> wrote in message
>> > news:e6hOJEf3EHA.1404@TK2MSFTNGP11.phx.gbl...
>> >> Hi All,
>> >>
>> >> who suggest why subj do not affect on displayed result for date?
>> >>
>> >>
>> >
>> >[/color]
>>
>>[/color]
>
>[/color]


Volodymyr Lozovoy
Guest
 
Posts: n/a
#6: Nov 19 '05

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


.... even if I use format {0:dd-MM-yy} nothing changes.

"Volodymyr Lozovoy" <vlozovoy@mail.ru> сообщил/сообщила в новостях
следующее: news:eEFprDg3EHA.3504@TK2MSFTNGP12.phx.gbl...[color=blue]
>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" <removemeegoldin@monarchmed.com> сообщил/сообщила в
> новостях следующее: news:eRq7auf3EHA.924@TK2MSFTNGP14.phx.gbl...[color=green]
>> 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" <vlozovoy@mail.ru> wrote in message
>> news:O8nMDhf3EHA.3316@tk2msftngp13.phx.gbl...[color=darkred]
>>> 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[/color]
>> 2004.[color=darkred]
>>>
>>>
>>> "Eliyahu Goldin" <removemeegoldin@monarchmed.com> сообщил/сообщила в
>>> новостях следующее: news:OC2pfKf3EHA.2196@TK2MSFTNGP14.phx.gbl...
>>> > Because you are likely making mistakes.
>>> >
>>> > Eliyahu
>>> >
>>> > "Volodymyr Lozovoy" <vlozovoy@mail.ru> wrote in message
>>> > news:e6hOJEf3EHA.1404@TK2MSFTNGP11.phx.gbl...
>>> >> Hi All,
>>> >>
>>> >> who suggest why subj do not affect on displayed result for date?
>>> >>
>>> >>
>>> >
>>> >
>>>
>>>[/color]
>>
>>[/color]
>
>[/color]


Volodymyr Lozovoy
Guest
 
Posts: n/a
#7: Nov 19 '05

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


Do i understand right that all data is in text format?

"Eliyahu Goldin" <removemeegoldin@monarchmed.com> сообщил/сообщила в
новостях следующее: news:eRq7auf3EHA.924@TK2MSFTNGP14.phx.gbl...[color=blue]
> 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" <vlozovoy@mail.ru> wrote in message
> news:O8nMDhf3EHA.3316@tk2msftngp13.phx.gbl...[color=green]
>> 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[/color]
> 2004.[color=green]
>>
>>
>> "Eliyahu Goldin" <removemeegoldin@monarchmed.com> сообщил/сообщила в
>> новостях следующее: news:OC2pfKf3EHA.2196@TK2MSFTNGP14.phx.gbl...[color=darkred]
>> > Because you are likely making mistakes.
>> >
>> > Eliyahu
>> >
>> > "Volodymyr Lozovoy" <vlozovoy@mail.ru> wrote in message
>> > news:e6hOJEf3EHA.1404@TK2MSFTNGP11.phx.gbl...
>> >> Hi All,
>> >>
>> >> who suggest why subj do not affect on displayed result for date?
>> >>
>> >>
>> >
>> >[/color]
>>
>>[/color]
>
>[/color]


Volodymyr Lozovoy
Guest
 
Posts: n/a
#8: Nov 19 '05

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


Thank you! I found my mistake.

"Eliyahu Goldin" <removemeegoldin@monarchmed.com> сообщил/сообщила в
новостях следующее: news:eRq7auf3EHA.924@TK2MSFTNGP14.phx.gbl...[color=blue]
> 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" <vlozovoy@mail.ru> wrote in message
> news:O8nMDhf3EHA.3316@tk2msftngp13.phx.gbl...[color=green]
>> 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[/color]
> 2004.[color=green]
>>
>>
>> "Eliyahu Goldin" <removemeegoldin@monarchmed.com> сообщил/сообщила в
>> новостях следующее: news:OC2pfKf3EHA.2196@TK2MSFTNGP14.phx.gbl...[color=darkred]
>> > Because you are likely making mistakes.
>> >
>> > Eliyahu
>> >
>> > "Volodymyr Lozovoy" <vlozovoy@mail.ru> wrote in message
>> > news:e6hOJEf3EHA.1404@TK2MSFTNGP11.phx.gbl...
>> >> Hi All,
>> >>
>> >> who suggest why subj do not affect on displayed result for date?
>> >>
>> >>
>> >
>> >[/color]
>>
>>[/color]
>
>[/color]


Closed Thread