Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Split Now() in to date and time fields

Status
Not open for further replies.

MrMode

Technical User
Aug 28, 2003
195
GB
I have a scanned field that records Now() when a user interacts with the databse. I want to take the scanned field and split Now() in to 2 new fields called date and time whilst keeping the scanned field.

I know how to concatenate but not how to do the reverse. The operator that seperates the information is <space>

Any suggestions?
 
A starting point:
txtDate = Left(txtNow, InStr(txtNow, " ") - 1)
txtTime = Mid(txtNow, 1 + InStr(txtNow, " "))


Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top