This example shows the use of the VbsDbGetDateFormat method.
Such date format is automatically determined by VBSdb, depending upon the session.lcid value (that can be freely decided by the developer, according to current user nationality).
Add a new record

Field New record
LastName
FirstName
BirthDate
('MM/DD/YYYY hh:mm:ss')
Cancel

This is the code implementing the example:
<!--#include file="VBSdb/inc.asp"-->
<%
   session.lcid = 1033
   VbsDbNew objVbsDb
   strDateFormat = VbsDbGetDateFormat( objVbsDb )
   objVbsDb( "MdbPath" ) = "data/nwind.mdb"
   objVbsDb( "Sql" ) = "select EmployeeId,LastName,FirstName from Employees"
   objVbsDb( "ViewNavigationButtons" ) = "first;prev;next;last;search;add;update;delete"
   objVbsDb( "GridHideFields" ) = "EmployeeId;BirthDate"
   objVbsDb( "FormHideFields" ) = "EmployeeId;BirthDate"
   objVbsDb( "SearchFields" ) = "LastName;FirstName;BirthDate"
   objVbsDb( "EditTableName" ) = "Employees"
   objVbsDb( "EditKeyFields" ) = "EmployeeId"
   objVbsDb( "EditFields" ) = "LastName;FirstName;BirthDate"
   objVbsDb( "EditAddFieldDefaults" ) = "LastName|MyLastName;FirstName|MyName;BirthDate|Not a date!"
   objVbsDb( "InputValidateDateFields" ) = "BirthDate|BirthDate is not a valid date (date format is '" & strDateFormat & "')"
   objVbsDb( "GlobalFieldHeaders" ) = "BirthDate|BirthDate<br><font size=1>('" & strDateFormat & "')</font>"
   objVbsDb( "GlobalStartScreen" ) = "Add"
   VbsDb objVbsDb
%>
This demonstrative program connects to Nwind.mdb, the well known Microsoft Access sample database: the names of companies, products, people, characters, and/or data mentioned herein are fictious and are in no way intended to represent any real individual, company, product, or event. To download a copy of Nwind.mdb, please visit Microsoft's site.