locked
time is getting appended with date of birth RRS feed

  • Question

  • Hi,

    I have developed a simple asp.net web application for Employee Details using grid view. Everything is working all right but when I run the application then in date of birth column the time is also getting appended like "12:00:00 AM". But I don't want this to be displayed. In code also I haven't written any time format code. so what is the reason that it is appearing while running the application. It appears only when the previous data is saved. Please help me..

    Wednesday, December 17, 2014 10:05 AM

Answers

  • Hi ashish_ni90,

    Per my understanding that you have a fields "Birth" which is Date type but when display in the report, it display as date/time with  default  time "12:00:00 AM" after the date, right?

    I have tested on my local environment and can reproduce the problem. By default, the date type in the DB always display as Date/Time in the report, so we can use the expression to get just the date to display.

    Expression below for your reference:
    =FormatDateTime(Fields!Birth.Value, DateFormat.ShortDate)

    If you still have any problem, please feel free to ask.

    Regards
    Vicky Liu

    • Proposed as answer by Vicky_Liu Tuesday, December 23, 2014 1:10 AM
    • Marked as answer by Vicky_Liu Wednesday, December 24, 2014 1:06 AM
    Thursday, December 18, 2014 6:04 AM

All replies

  • 1. You have to find out the code which populates the data in that column (Code to Update Existing records)

    2. If possible, check report dataset queries. You may need to cast the BirthDate column to Date data type.


    -Vaibhav Chaudhari

    • Proposed as answer by Vicky_Liu Thursday, December 18, 2014 5:00 AM
    Wednesday, December 17, 2014 10:26 AM
  • Hi ashish_ni90,

    Per my understanding that you have a fields "Birth" which is Date type but when display in the report, it display as date/time with  default  time "12:00:00 AM" after the date, right?

    I have tested on my local environment and can reproduce the problem. By default, the date type in the DB always display as Date/Time in the report, so we can use the expression to get just the date to display.

    Expression below for your reference:
    =FormatDateTime(Fields!Birth.Value, DateFormat.ShortDate)

    If you still have any problem, please feel free to ask.

    Regards
    Vicky Liu

    • Proposed as answer by Vicky_Liu Tuesday, December 23, 2014 1:10 AM
    • Marked as answer by Vicky_Liu Wednesday, December 24, 2014 1:06 AM
    Thursday, December 18, 2014 6:04 AM