[Last Call] Learn how to a build a cloud-first strategyRegister Now

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

Microsoft, Access, 2003, convert 19970519 text to date format

I am trying to covert the following text field 19970519 to a date field in Access 2003. This text field is in YYYYMMDD.
0
VFtechnology
Asked:
VFtechnology
  • 2
1 Solution
 
rockiroadsCommented:
something like this perhaps

mydatefield = dateserial(left$(mytextfield,4), mid$(mytextfield,5,2), right$(mytxtfield,2))

0
 
Rey Obrero (Capricorn1)Commented:
cdate(mid("19970519",5,2)&"/"& mid("19970519",7,2)&"/"&left("19970519",4))

or

cdate(mid([datefield],5,2)&"/"& mid([datefield],7,2)&"/"&left([datefield],4))
0
 
rockiroadsCommented:
VFtechnology
just out of interest, did dateserial not work for you? be interested to know where its failings with regards to your code
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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