Excel 2000 vs 2003 date format issue (reposted)

G

Geraldine

I've done some testing using different versions of Excel which I hope will
help me to ask my question more specifically in order to get my issue
resolved. Thanks to the community for your patients.

I've created a function that formats my date field to mmddyy so that all I
see is a six digit number for example from 04/21/08 to 042108.

I do this because I'm creating an upload file that requires a prn extension
with the
date field formated as 6 digits and number only.

This works fine for me when using Excel 2003, 2002 and XP however will not
work when using Excel 2000.

As long as I view the data in Excel it looks exactly as I need it but once I
save as
..prn that field is replaced with ######. I realize the issue is that the
field is too small but that is only because it still assumes the slashes are
present where they are not.

Because this doesn't happen in any of the later versions I'm hoping someone
will know what changed and what I may do to work around this issue.

If anyone has a suggetions of how else I might convert my date field from
04/28/08 to 042808 I'd be open to that as well.

Any suggestions?

As always, thanks for any help.
 
J

JLGWhiz

Or, in VBA:

myDate = Format(Date, "mmddyy")
myFileName = ActiveFile.Name-myDate.prn
 
J

JLGWhiz

That should be:

myDate = Format(Date, "mmddyy")
myFileName = ActiveWorkbook.Name-myDate & ".prn"

for correct syntax.
 

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