Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Converting Date to String 1

Status
Not open for further replies.

Josh01

Programmer
Jan 9, 2002
23
GB
Hi all,

I have a date in the format "yyyy/mm/dd" that is a dynamic value. Depending on what the date is, i want a cell within another sheet to reflect the full name of the month plus a two year code. I.E. January 02.

Can anyone help me to do this please????


 
Hi Josh,

Dim intA As Date
intA = "2002/01/18"
Debug.Print Format(intA, "mmmm yy")
'output will read January 02

Jon
 
Jon,


Thanks for that, as it turned out I managed to use a work around. Which, unfortunatly led to another problem. I now have two dates in the format that i would like them, which is now dd - mmmm - yyyy!, however i need to work out the number of work days between these dates, which are dynamic. Any ideas?

Cheers
 
Hi Josh,

Try using the DateDiff() function
Days = DateDiff("d",date1,date2)

Jon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top