[AccessD] Date Format Not Working
Bill Benson
bensonforums at gmail.com
Sat Jun 27 12:10:37 CDT 2015
Oh the the answer is simple, parse out the weekday part
On Jun 27, 2015 1:09 PM, "Rocky Smolin" <rockysmolin at bchacc.com> wrote:
> Bill:
>
> That generates a Type Mismatch error. I think the Cdate doesn't like
> 'Friday, June 28, 2013 ' as an argument.
>
> Rocky
>
>
> -----Original Message-----
> From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of
> Bill Benson
> Sent: Saturday, June 27, 2015 9:48 AM
> To: Access Developers discussion and problem solving
> Subject: Re: [AccessD] Date Format Not Working
>
> Try format(cDate(Me.txtFromDate),"mm/dd/yy"). What I think is happening is
> that format is not recognizing the argument as a genuine date, but rather
> as
> text
>
> On Sat, Jun 27, 2015 at 12:29 PM, Rocky Smolin <rockysmolin at bchacc.com>
> wrote:
>
> > Dear List:
> >
> > I'm having a problem with a date conversion.
> >
> > I have two unbound text boxes holding a date range - txtFromDate and
> > txtToDate. They are formatted Long Date in the property sheet.
> >
> > When I need to filter the form to show only records in that date
> > range, I need to convert it to a short date bracketed by # and embed
> > in a SQL statement as part of the form filter.
> >
> > But whether I use Format(Me.txtFromDate,"Short Date") or
> > format(Me.txtFromDate,"mm/dd/yy") the result is still the Long Date
> > format which the Me.Filter chokes on.
> >
> > Mysterious - I cannot figure out why Format(Me.txtFromDate,"Short
> > Date") doesn't convert the date in the text box to mm/dd/yy format.
> >
> > MsgBox Format(Me.txtFromDate, "Short Date") still shows Tuesday June
> > 14,
> > 2015 and it ends up that way in the Filter which don't work.
> >
> > txtToDate behavior is the same.
> >
> >
> > Any clues? What am I missing/doing wrong?
> >
> > MTIA
> >
> > Rocky Smolin
> > Beach Access Software
> > 858-259-4334
> > www.bchacc.com <http://www.bchacc.com/> www.e-z-mrp.com
> > <http://www.e-z-mrp.com/>
> > Skype: rocky.smolin
> >
> > --
> > AccessD mailing list
> > AccessD at databaseadvisors.com
> > http://databaseadvisors.com/mailman/listinfo/accessd
> > Website: http://www.databaseadvisors.com
> >
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>
More information about the AccessD
mailing list