Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / April 2005

Tip: Looking for answers? Try searching our database.

Converting string to Date

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jim Scarlett - 09 Apr 2005 16:43 GMT
Hello! I have inherited a DB containing dates as nvarchar 50!! Is there a
function to convert this to a genuine datetime datatype?
John Nurick - 09 Apr 2005 18:25 GMT
Hi Jim,

There are zillions of ways of representing dates as text. The built-in
CDate() function will convert some of them; otherwise the usual
technique is to parse the string into numbers representing year, month
and day (using VBA functions such as Left(), Mid(), InStr()) and then
pass these to the DateSerial() function which combines them into returns
a date value.

>Hello! I have inherited a DB containing dates as nvarchar 50!! Is there a
>function to convert this to a genuine datetime datatype?

--
John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.