Jump to content

How to only store time in visual basic and sql 2008

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
3 replies to this topic

#1
WendyT

WendyT

    Newbie

  • Members
  • Pip
  • 6 posts
Hi everybody,

I wonder how can we store time only in SQL database through Visual Studio 2008? In Visual Studio 2008, when I use datetime, Visual Studio and SQL store the date and time together. However I only want to store time. Thanks for the help.

Wendy

#2
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
You can store the date portion as 12/31/1899. That allows you to ignore it in the application.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#3
WendyT

WendyT

    Newbie

  • Members
  • Pip
  • 6 posts
I have tried this trick, but when I display the data thru dataview, the date still appears there. Help me please somebody....

Wendy Tjan

#4
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
VB should have a way to change the display format. Since I'm not a VB programmer, I can't offer much more than that.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog