Mar 23, 2006 #1 AT76 Technical User Apr 14, 2005 460 US Hi, I brought a table from AS400 to access. It brought a particular column as a "NUMBER" data type. The Format of the field is: YYYYMMDD. Is there a way to change this field (perhaps thru a query to DDMMYYYY and change the data type to "DATE" Thank you!
Hi, I brought a table from AS400 to access. It brought a particular column as a "NUMBER" data type. The Format of the field is: YYYYMMDD. Is there a way to change this field (perhaps thru a query to DDMMYYYY and change the data type to "DATE" Thank you!
Mar 23, 2006 #2 S SkipVought Programmer Dec 4, 2001 47,492 US Hi, Your YYYYMMDD STRING is not a REAL DATE in MS Access. It must be CONVERTED to a Date Serial Value using the DateSerial Function Code: DateSerial(Left([AS400String],4),Mid([AS400String],5,2),Right([AS400String],2)) this value can then be displayed in a number of formats. Skip, [red]Be Advised![/red] A chicken, who would drag a wagon across the road for 2 cents, is… Poultry in motion to pullet for a paltry amount! Upvote 0 Downvote
Hi, Your YYYYMMDD STRING is not a REAL DATE in MS Access. It must be CONVERTED to a Date Serial Value using the DateSerial Function Code: DateSerial(Left([AS400String],4),Mid([AS400String],5,2),Right([AS400String],2)) this value can then be displayed in a number of formats. Skip, [red]Be Advised![/red] A chicken, who would drag a wagon across the road for 2 cents, is… Poultry in motion to pullet for a paltry amount!
Mar 23, 2006 Thread starter #3 AT76 Technical User Apr 14, 2005 460 US Thank you!! Works Great! Upvote 0 Downvote