473,397 Members | 2,099 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Year(Date) Function

Hi

Im working on a Year(Date) function right now, the output of that function
is this "2005", my question is how can i change the format into this "05"

Function: Year(Date)
Output: 2005
Needed Output: 05

Thanks
Jul 22 '05 #1
2 2045
Gazing into my crystal ball I observed "ltamisin" <le****@yahoo.com>
writing in news:uV**************@TK2MSFTNGP10.phx.gbl:
Hi

Im working on a Year(Date) function right now, the output of that
function is this "2005", my question is how can i change the format
into this "05"

Function: Year(Date)
Output: 2005
Needed Output: 05

Function Year(Date)
Year = Right(Datepart("yyyy",Date),2)
End Function

--
Adrienne Boswell
http://www.cavalcade-of-coding.info
Please respond to the group so others can share
Jul 22 '05 #2
Hey Adrienne thanks :-)

"Adrienne" <ar********@sbcglobal.net> wrote in message
news:Xn***************************@207.115.63.158. ..
Gazing into my crystal ball I observed "ltamisin" <le****@yahoo.com>
writing in news:uV**************@TK2MSFTNGP10.phx.gbl:
Hi

Im working on a Year(Date) function right now, the output of that
function is this "2005", my question is how can i change the format
into this "05"

Function: Year(Date)
Output: 2005
Needed Output: 05

Function Year(Date)
Year = Right(Datepart("yyyy",Date),2)
End Function

--
Adrienne Boswell
http://www.cavalcade-of-coding.info
Please respond to the group so others can share

Jul 22 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Gobi | last post by:
Hello everyone, I have a database of clients that has a Date_Closed Field and a Table_Name field along w/other various client infor. At the end of the year, files get moved into a "History" table...
0
by: Wayne Aprato | last post by:
My computer is using the dd/mm/yyyy date format. Is there a simple input mask for a date field that will accept just the month and year eg. 08/04 and maybe default the day to 01? I presume that...
3
by: MIG | last post by:
I had a form which used year(date) to compare an input value with the year of today's date. This was working fine. Now, for some reason, I am getting run-time error 2465 "Library Catalogue...
7
by: Adrian | last post by:
I hit on this problem converting a VB.NET insurance application to C#. Age next birthday calculated from date of birth is often needed in insurance premium calculations. Originally done using...
8
by: Tim | last post by:
Does anyone know how to convert a date to the hundred year date format. For example, how would i convert 8/11/2004 to its hundred year date format. Thanks! Tim
4
by: Vasilis X | last post by:
Hello. I want to use the excel function Year( ) (or Day, Month, Minute etc...) in a Visual Basic .net application. How can i do this? I tried Excel.WorksheetFunction but this class doesn't...
6
by: phforum | last post by:
If user input the date is 2006-07-01. How to convert it to last year 2005-07-01? Thanks
1
by: Jimmy | last post by:
I'm trying to run a query that will show only records where the year in a date field equals the current year: SELECT tblSideJob.SideJobID, tblSideJob.Date FROM tblSideJob WHERE...
10
by: ashore | last post by:
Guys, the line below just returned "Dec 07" as the date for one month back from today. Hardly life-threatening, but any thoughts? <?php print date("M `y", mktime(0, 0, 0, date("m")-1, date("d"),...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.