Skip to main content



No record found.

Microsoft Dynamics SL forum
Suggested answer

Display date and time on screen

Posted on by 1,615

Hi there,

How do i display the date AND time of a field (pjrefhdr.user7) on a screen.  

I have customised the Budget Revision Maintenance screen and added this field but only the date part seems to show even though there is a time part in the table in the database.


  • Suggested answer
    Mark E Profile Picture
    Mark E 6,405 on at
    RE: Display date and time on screen

    This is not as simple as you might think.  Using the DSLDate control will only show the date in MM/dd/yyyy format.  In order to display the time from the table, you would need to add TextBox to the screen, then convert the smalldatetime field from the table into a Time format.  Problem is, you cannot add the same field twice to a screen, so you can only display either the date OR the time.

    I also don't think that Customization Manager will allow you to add a smalldatetime field using a TextBox, so you would probably need to convert the smalldatetime data value in a SQL view to a char field, then you might be able to pull it into the screen.

    You would need to add a virtual table (SQL view) to the database that pulls in the data fields you need, create and add a DH file that holds the view data in a buffer, then add the textbox that pulls in the converted smalldatetime field ("HH:MM AM/PM" format) from the view.

    It would require some VBA and SQL code/skills to accomplish all this.  As I started with, not as simple as you might think....

  • Jo Wykerd Profile Picture
    Jo Wykerd 1,615 on at
    RE: Display date and time on screen

    Is nobody able to help me?!!

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .


André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 288,420 Super User

Martin Dráb Profile Picture

Martin Dráb 225,672 Super User

nmaenpaa Profile Picture

nmaenpaa 101,148


Featured topics

Product updates

Dynamics 365 release plans