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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

change the numberformat to yyyymmdd

Status
Not open for further replies.

OneMixedUpStranger

Technical User
Dec 4, 2001
7
IS
Hello

I need to change a format of a variable that looks like this

SynaDag = Calendar1.Year & Calendar1.Month & Calendar1.Day & ".txt"

this returns the format yyyymmd when the day is under 10
(2001127)

what i need is the numberFormat yyyymmdd (20011207)
I know that if I would be working with a cell in Excel it would be

Selection.NumberFormat = "yyyymmdd"

Please post any suggestions

Thanks

 
dim dYourDate as date

SynaDag = format$(date,"YYYYMMDD") & ".txt"

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top