Convert the date to day of the week.

N

Nils Titley

Dave,

I am going to stop working on this right at the moment. Clean up the code
and send it to my friend and see if he finds any date problems. I think
there will be a problem for Dec months. I also think that when the date is
in the General format it works.

I can not get the DateSerial to parse correctly but I can address that later.

Thank you for all your effort and assistance. You have been very good about
helping me and I appreciate it very much. I hope when I come back with some
more things on this you will help me.

Regards,
 
D

Dave Peterson

Ahhh.

It could be because not all those numbers will be 8 digits (if the day is before
the 10th!).

dim myStr as string
dim myDate as date
with activecell
mystr = format(.value, "00000000") 'add leading 0's if they're not there
myDate = DateSerial(Right(mystr, 4), Mid(mystr, 3, 2), Left(mystr, 2))
.NumberFormat = "mmmm dd, yyyy"
.Value = myDate
end with

=====
There could be other problems, too. If this doesn't help, make sure you post
back with the offending string.

Nils said:
Dave,

I am going to stop working on this right at the moment. Clean up the code
and send it to my friend and see if he finds any date problems. I think
there will be a problem for Dec months. I also think that when the date is
in the General format it works.

I can not get the DateSerial to parse correctly but I can address that later.

Thank you for all your effort and assistance. You have been very good about
helping me and I appreciate it very much. I hope when I come back with some
more things on this you will help me.

Regards,
 

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

Similar Threads


Top