format OXXXXXO

O

Octet32

I have a field in a query called DELDAYS in the field the date reads 0XXXXX0
how can I for matt this so it will show as SMTWTHFS? This date represent the
day of the week in some case it will be different combo’s I am new to VB can
anyone help with this? thanks octet
 
R

raskew via AccessMonster.com

Hi -

I'm a little confused.

1) Is the field an actual date/time field?

2) Given that today is Wed 30 Dec 2009, what is it that you would want to see?


Bob
 
O

Octet32

the field shows custmer del days as 0XXXXXO this mean monday thu friday i
would like it to show NYYYYYN or SMTWTHFS so i can match it to anther table
 
R

raskew via AccessMonster.com

In A2000 and later you can use the Replace() function to convert your OXXXXXO
to NYYYYYN.
Before trying this BACKUP your DB.
Create an update query showing just the DelDays field. In the UpdateTo cell
place
Replace([DelDays], "X", "Y"). Run the query then do it a second time using
Replace([DelDays], "O", "N").

HTH - Bob

the field shows custmer del days as 0XXXXXO this mean monday thu friday i
would like it to show NYYYYYN or SMTWTHFS so i can match it to anther table
[quoted text clipped - 10 lines]
 
O

Octet32

Thanks but i only need to convert to this format to querry.
i am conecting to the DB with ODBC I dont want to update the field just
chang it in the querry

raskew via AccessMonster.com said:
In A2000 and later you can use the Replace() function to convert your OXXXXXO
to NYYYYYN.
Before trying this BACKUP your DB.
Create an update query showing just the DelDays field. In the UpdateTo cell
place
Replace([DelDays], "X", "Y"). Run the query then do it a second time using
Replace([DelDays], "O", "N").

HTH - Bob

the field shows custmer del days as 0XXXXXO this mean monday thu friday i
would like it to show NYYYYYN or SMTWTHFS so i can match it to anther table
[quoted text clipped - 10 lines]
day of the week in some case it will be different combo’s I am new to VB can
anyone help with this? thanks octet
 
J

John W. Vinson

Thanks but i only need to convert to this format to querry.
i am conecting to the DB with ODBC I dont want to update the field just
chang it in the querry

You can do this in a select query as well as in an update query. Try:

NewDelDays: Replace(Replace([DelDays], "X", "Y"), "O", "N")

You should then be able to use NewDelDays to link to your external table.
 
R

raskew via AccessMonster.com

Thanks for that John -

I envisioned a similar solution but didn't even try it, thinking it wouldn't
work.

Best wishes - Bob
John said:
Thanks but i only need to convert to this format to querry.
i am conecting to the DB with ODBC I dont want to update the field just
chang it in the querry

You can do this in a select query as well as in an update query. Try:

NewDelDays: Replace(Replace([DelDays], "X", "Y"), "O", "N")

You should then be able to use NewDelDays to link to your external table.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top