H Haynesey Registered User. Local time Today, 23:43 Joined Dec 19, 2001 Messages 190 Apr 5, 2007 #1 Hi, I need to use the following code to present the previous year (2006 for example) in the format 06. However, the code misses the 0 off the front. Format(Date, "yy") - 1) Any ideas? Thanks Lee
Hi, I need to use the following code to present the previous year (2006 for example) in the format 06. However, the code misses the 0 off the front. Format(Date, "yy") - 1) Any ideas? Thanks Lee
boblarson Smeghead Local time Today, 15:43 Joined Jan 12, 2001 Messages 32,040 Apr 5, 2007 #2 Format(DateAdd("yyyy", -1, date), "yy")
H Haynesey Registered User. Local time Today, 23:43 Joined Dec 19, 2001 Messages 190 Apr 5, 2007 #3 Thanks that worked great! Cheers Lee
ted.martin Registered User. Local time Today, 23:43 Joined Sep 24, 2004 Messages 743 Apr 5, 2007 #4 I was going to say knock off 365 days
L llkhoutx Registered User. Local time Today, 17:43 Joined Feb 26, 2001 Messages 4,013 Apr 7, 2007 #5 Format(DateAdd("d", -365, date), "dd") or something like that. The year subtracting is better. There are numerous date manipulations and functions. If you don't find what you want on this forum use Google.
Format(DateAdd("d", -365, date), "dd") or something like that. The year subtracting is better. There are numerous date manipulations and functions. If you don't find what you want on this forum use Google.