For the control, I'm pretty sure you will be stuck with a Date Time Picker/Viewer unless you create a custom control that will just do time. In that case the Article linked by @MichaelWashington in the answer mentioned by @MattThalman is the way to go.
But as for display, Lightswitch certainly allows you to format it to your liking. Looking at this MSDN article: How to: Format Numbers and Dates in a LightSwitch Application. Basically you would open your table in the Data Designer and then select your Date Time field. In that field's Properties, you can enter a Format Pattern.
From the MSDN article: Reference: Number and Date Formats. A Format Pattern of "t"
would result in a displayed result of: 1:45 PM
.
@marc_s is correct. Use the appropriate types. Storing dates and times as strings will cause you a massive amount of headaches later on. Don't do it.
I'm not sure as to the ramifications of using a Date Time type in Lightswitch and time(7)
is SQL. I would probably just change your database type to datetime
or datetime2
. If you don't use the date part, so be it. But it will be there later on if the requirements change.