MS Access date formatting

Hi Gang... I have a query that retrieves a date fiield stored as text :-( and then formats it as such

>=Format([Forms]![frm_Select Rx Date Range]![ctlRxStartDate],"yyyymmdd") And <=Format([Forms]![frm_Select Rx Date Range]![ctlRxEndDate],"yyyymmdd")

How can I make this date range be +1 day?
hwassingerAsked:
Who is Participating?
 
Gustav BrockConnect With a Mentor CIOCommented:
That would be:
>=Format(DateAdd("d",1,[Forms]![frm_Select Rx Date Range]![ctlRxStartDate]),"yyyymmdd") 
And 
<=Format(DateAdd("d",1,[Forms]![frm_Select Rx Date Range]![ctlRxEndDate]),"yyyymmdd") 

Open in new window


/gustav
0
 
sshah254Commented:
0
 
Gustav BrockCIOCommented:
Try this:
>=Format([Forms]![frm_Select Rx Date Range]![ctlRxStartDate],"yyyymmdd") 
And 
<=Format(DateAdd("d",1,[Forms]![frm_Select Rx Date Range]![ctlRxEndDate]),"yyyymmdd")

Open in new window


/gustav
0
Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

 
hwassingerAuthor Commented:
cactus, this is close but I need BOTH dates to be +1. This is Necassary as the user is entering the date in a form and I need to carry it from 1 query to another as the query must cross a date line due to work hours
0
 
hwassingerAuthor Commented:
>=Format(DateAdd("d",1,[Forms]![frm_Select Rx Date Range]![ctlRxStartDate],"yyyymmdd") And <=Format(DateAdd("d",1,[Forms]![frm_Select Rx Date Range]![ctlRxEndDate]))

Seems to fail and resets itself back to

>=Format([Forms]![frm_Select Rx Date Range]![ctlRxStartDate],"yyyymmdd") And <=Format(DateAdd("d",1,[Forms]![frm_Select Rx Date Range]![ctlRxEndDate]))
0
 
hwassingerAuthor Commented:
Thanks!
0
 
Gustav BrockCIOCommented:
You are welcome!

/gustav
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.