[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 139
  • Last Modified:

VB Database Creation

I am creating a database and its tables in visual basic.  How do I set a Date field to a short date format?  And how would I set a field so that it is required in VB code?
0
tlounsbu
Asked:
tlounsbu
1 Solution
 
mark2150Commented:
Internally the database only knows one form of Date type. There is no real way to create a "short date" type unless you save it as a string. This is slower than just using the normal date type.

You can display the date in short form by using the FORMAT command. You can make your own layout and either use or override the locale settings for dividers and such.

As for requiring a field, this is not normally done at the database level but you input validation routines don't enable the [Save/Update] button until that field has an acceptable value.

M
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now