Jumat, 30 Januari 2015

Re: [MS_AccessPros] Date question

 

Patty-

AH! That needs to be the name of the date field in the table, not the name of the table. And the table dbo_person needs to be a source table in the query - upper part of the design grid.

Probably also best to add brackets:

RecDate: CDate(Left ([dbo_person].[DateField], 4), & "-" & Mid ([dbo_person].[Datefield], 3, 2) & "-" & Right([dbo_person].[DateField], 2))

Replace "DateField" with the actual field name.

John Viescas, Author
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications
SQL Queries for Mere Mortals
http://www.viescas.com/
(Paris, France)

On Jan 30, 2015, at 5:56 PM, pattykf@cox.net [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:

The dbo_person is the table that I am pulling the information from. What I was trying to do is to convert a date that is in text format to a date format. The date comes in as 20150101
Thank you sorry I wasn't clear

------------------------------------
Posted by: pattykf@cox.net
------------------------------------

------------------------------------

Yahoo Groups Links

__._,_.___

Posted by: John Viescas <johnv@msn.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (11)

.

__,_._,___

Tidak ada komentar:

Posting Komentar