How do I get a 2 digit date?

I have a control on a form which is a Date/Time control called "txtcd1retd", 
its fomat is dd/mm/yy There is another control called "txtYear" with it 
control source =Year([txtcd1retd]). If "txtcd1retd" is 01/02/08 I want 
txtYear to be 08 but I get 2008. How can I just get 08?
Thanks
Tony 


0
Tony
1/28/2008 11:56:32 AM
access.forms 6864 articles. 2 followers. Follow

2 Replies
944 Views

Similar Articles

[PageSpeed] 4

Try:
    =Format([txtcd1retd], "yy")

-- 
Allen Browne - Microsoft MVP.  Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Tony Williams" <tw@invalid.com> wrote in message
news:%23HCsWTaYIHA.4196@TK2MSFTNGP04.phx.gbl...
>I have a control on a form which is a Date/Time control called 
>"txtcd1retd", its fomat is dd/mm/yy There is another control called 
>"txtYear" with it control source =Year([txtcd1retd]). If "txtcd1retd" is 
>01/02/08 I want txtYear to be 08 but I get 2008. How can I just get 08?
> Thanks
> Tony 

0
Allen
1/28/2008 12:07:54 PM
Thanks Allen, worked fine
Tony
"Allen Browne" <AllenBrowne@SeeSig.Invalid> wrote in message 
news:%23cpvrZaYIHA.1188@TK2MSFTNGP04.phx.gbl...
> Try:
>    =Format([txtcd1retd], "yy")
>
> -- 
> Allen Browne - Microsoft MVP.  Perth, Western Australia
> Tips for Access users - http://allenbrowne.com/tips.html
> Reply to group, rather than allenbrowne at mvps dot org.
>
> "Tony Williams" <tw@invalid.com> wrote in message
> news:%23HCsWTaYIHA.4196@TK2MSFTNGP04.phx.gbl...
>>I have a control on a form which is a Date/Time control called 
>>"txtcd1retd", its fomat is dd/mm/yy There is another control called 
>>"txtYear" with it control source =Year([txtcd1retd]). If "txtcd1retd" is 
>>01/02/08 I want txtYear to be 08 but I get 2008. How can I just get 08?
>> Thanks
>> Tony
> 


0
Tony
1/28/2008 12:15:14 PM
Reply:

Similar Artilces:

Outlook 2007 email sorting by time of day then date
I would like to sort all emails received by time of day 1st then by date. Haven't found an easy way to do this as the received time shows as all in one field ie (mm/dd/yy hh:mm:ss). Could get query builder to work for me. ...

Is there ANY possibility to view embedded PDF object in XLS file after when this xls file is digitally signed?
Hello, I created an XLS file with an embedded pdf object. I can view this object when I double click on its icon. However, if I sign this xls file, I am no longer able to view this embedded PDF object. If I double click on its icon, nothing happen. I am concerned in this last two days with no results. I appreciated any advice. Mike ...

Excel Functions #2
hi guys, just wondered if anyone knew which function i would use to do this, because im fairly novice with excel: Basically if the cell value is above 110 i want the cell to turn green if the cell value is between 110 and 105 i want it to turn yellow if the cell value is below 105 i want it to turn red any help would be seriously appreciated. thanks spotseven wrote: > hi guys, just wondered if anyone knew which function i would use to > do this, because im fairly novice with excel: > > Basically if the cell value is above 110 i want the cell to turn gr...

How do I get an item's rank?
Hi, Let's say I have 10 merchants selling the same product at different prices. How do I get a vendor's ranking? I'd be passing the stored procedure ProductID and VendorID. And the data comes from a table with three columns ProductID, VendorID, Price where the Price field is smallmoney. -- Thanks, Sam Something like With RankedVendors As (Select ProductID, VendorID, Price, Row_Number() Over (Order By Price) As Rank From <YourTable> Where ProductID = <product you are looking for>) Select ProductID, VendorID, Price, Rank From RankedVendors ...

RMS 2.0 Integration Approach
Hi everyone, I have Commerce Server 2009 in place and would like to integrate it with RMS2.0. What are some ways in general that an external system can integrate with RMS2.0? Regards. ...

mailboxes are getting larger on Exchange Server
Dear all, I ve a problem in my exchange server 2003. * The mailboxes are getting larger and although i m delvering the mails to PST files *Many mailboxes shows that they r above the limit "mailbox disabled" .... i m using a quata for the mailboxes. and by browsing the mailbox i dont c any thing in the mail box from the user's side ... the only solution is to expand the its quota then it returns to normale stauts very strange!! Note: I m taking backup every day "the normal backup size was 17 GB after that its 65 GB" *It only took one day to get to the 65...

I keep getting and error on start of Office x.v
I just purchased Office X.v and installed it onto my Mac. I also removed Office Test Drive before installing the full Office X.v, but i didn't empty my trash. So after I installed the full version i keep getting the error "An unexpected error occurred while trying to load Microsoft Framework X library" on all office programs. I read on mactopia that this could be caused by "lock" identities in the microsoft identity file, but all of mine are unlocked. When i tried to empty my trash, it would not empty a few microsoft file because it says they are in use. Framework ...

Opening tab-delimited files in Excel... how to stop the autoformat of dates?
Hello, I'm doing bioinformatics work in which I often download tab-delimited files describing genomes and open them in Excel. Unfortunately, Excel decides that genes with names like APR1 and SEP7 are actually dates, and reformats them as such. This is a huge headache, as I often don't notice these problems until much later. Is there anyway to completely disable this date autoformatting? I've searched high and low and have yet to find a solution. Thanks! P.S. I'm using Excel 2002 -- salamander ------------------------------------------------------------------------ sa...

Trouble Printing Checks #2
I'm using Money 2004. I have a list of checks to be printed, but no 'Print Checks' on the left side panel. When I go the 'File' menu to print checks it gives me a "You don't have any accounts with checks to be printed." message. What can I do? David See http://umpmfaq.info/faqdb.php?q=91. "David" wrote: > What can I do? I would run a file repair to see if that will correct the number do indicate the number of checks that have been set to "print". "David" <David@discussions.microsoft.com> wrote in message news...

Access ODBC problem: Excel cannot get float columns
I need some help I'm trying to get Access external data from an Excel workbook, using the MS Query feature. Everything is ok except when I try to fetch some tables that ODBC refuses to get data from. The error message tells that the MS Access ODBC driver doesn't allow some columns to be transmited because of its number of characters. The most strange thing is that I can see the data from MS Query correctly, but I caannot get it back from Excel. After some tries, I thing it occurs only with real typed columns. Can anybody help me? I use Windows XP Home + Office 2000 spanish versio...

can't delete mailbox #2
I deleted a user account in AD but when I go to Exchange system manager I can't delete the mailbox. What is the deal? Wait until AD replicates then you'll be able to purge the mailboxes with the red Xs "Brandon Baker" <brandon@discussions.microsoft.com> wrote in message news:%23fkHzmOMGHA.1180@TK2MSFTNGP09.phx.gbl... >I deleted a user account in AD but when I go to Exchange system manager I >can't delete the mailbox. What is the deal? > Right click on Mailboxes in ESM and select Run Cleanup Agent. -- John Oliver, Jr MCSE, MCT, CCNA Exchange M...

Product list in CRM v.1.2
Hi all, i have another question concerning the product list, can i attach an excle sheet that contains my products instead of loging each product one by one as i have over 25,000 products to log? -- Regards, Marwa I'm afraid not. This is a major pain point for a lot of people and I do not kno of any 3rd party add-ons that have addressed it either. -- Matt Parks MVP - Microsoft CRM "marwa" <marwa@discussions.microsoft.com> wrote in message news:C062CF1E-EEF8-43B4-AC31-F299BF707252@microsoft.com... Hi all, i have another question concerning the product list, can ...

how to get a fixed window with caption?
hi! which is the best way to get a window (dialog box) with captionbar but no posibility for the user to move the window? thanks philipp Try overriding the WM_WINDOWPOSCHANGING message to prevent the move before it happens. >-----Original Message----- >hi! > >which is the best way to get a window (dialog box) with captionbar but no >posibility for the user to move the window? > >thanks philipp > > >. > ...

How do I get special symbols for correct sign?
...

OS version 10.2
In a previous post, I was told that Office 98 for MAC will not work on OS 10.2 and was directed toward getting Office 2004. In the system requirements for 2004, it says that it is for users who have 10.2.8 or later. Is OS 10.2 upgradable to 10.2.8 or do I need to go with Office X or 2001 for OS 10.2? Heath Kuszak IT Manager Verdone Landscape Architects, Inc. Heath Kuszak <heath@verdonelandarch.com> wrote: > In a previous post, I was told that Office 98 for MAC will not work on OS > 10.2 and was directed toward getting Office 2004. In the system requirements > for 2004, ...

Matrix #2
Hiya, I need to create a chart which is a matrix of four 'boxes' (a bit like the BCG 'Cash cow, star, etc matrix if you know it). But am having real trouble. What I need is this (and I'm going for the simplest method here - I ignored the four 'boxes' and just tried to get the data as I want on the chart): Data source: Project Name Value(1-10) Difficulty(1-10) Proj1 5 8 Proj2 8 10 Proj3 1 8 Proj4 3 ...

When will CRM 2.0 be released?
I was wondering if anyone has a firm(ish) idea when version 2 will be released. I've heard 2005, but that is a little vague. My company has identified a few gaps that should be resolved with the 2005 expected enhancements. If the release is put off until this time next year, we will go ahead and correct now. However, we would like to hold off wasting time\money is Microsoft will deliver within the 1st two quarters of 2005. Thoughts? The latest word is that CRM 2005 should be release sometime in calendar Q2 of 2005. Matt Parks MVP - Microsoft CRM ---------------------------...

Spinning Beach Ball
I seem to notice a correlation between seeing the spinning beach ball more often after launching MS Word for OSX. I removed the PDFMaker.Lib and this improved the performance a great deal, but still noticing the SBB more often after launching Word. Anyone know about this? Many Word issues are related to corrupt Word Settings or Normal Template. You could try removing the Word Settings file, then testing. The Normal Template could be renamed, then test. Be sure Word is closed before removing or changing any files. You could also consider running the Remove Office utility and reinstalling Offi...

can't get scrollbar to come up -- CScrollView
I am new to MFC and I am trying to get a simple app working with a scrollable view. I have put in the call to SetScrollSizes in the OnInitialUpdate method. I'm still not quite sure what sizeTotal is supposed to do. I just gave it a value of 5 for the y for now, which I think I want to set to the number of lines of text I have to display. And then I set y to 50. int numLines = 5; CSize sizeTotal; sizeTotal.cy = numLines; sizeTotal.cx = 50; SetScrollSizes( MM_TEXT, sizeTotal); In the OnDraw method, I put in code to draw my text on the view using the device context. The text get...

generate list of non-entries within dates
I use Excel (2007) to record activity and support for about 100 current online learners and I have to provide an activity summary sheet every two weeks. The list of learners is in one sheet and are marked "current", agreed break" or "completed" in an adjacent column. The total list is about 1000 and grows by about 10 each week. The activity log is another sheet of the same workbook. Assuming that all activity is logged in this way I need to generate a list (sheet) of those current learners who have not submitted any recent work and are therefore "inacti...

Newbie: can't get a calculated value on the form?
I have a table with numbers and a form that shows the numbers. I have a query that takes one of the numbers and mulitplies it. I put a text box on the form from the query result field, but I get a "#Name" error instead of the result. When I run the query, I get the correct result. Help, please? Ed "Ed from AZ" <prof_ofwhat@yahoo.com> wrote in message news:d1e7d27c-11d9-4696-8d19-4c5fdd9dbb89@d70g2000hsb.googlegroups.com... >I have a table with numbers and a form that shows the numbers. I have > a query that takes one of the numbers and mulitplies it. I p...

Excel #2
College text asks students how to save a file with a preview? I assume a print preview? Any suggestions? Choose File>Properties On the Summary tab, check 'Save preview picture. Click OK Tech Coor wrote: > College text asks students how to save a file with a preview? I assume a print preview? Any suggestions? -- Debra Dalgleish Excel FAQ, Tips & Book List http://www.contextures.com/tiptech.html ...

HOW USE 2 LANGUAGES IN AX. ???????????
Hello I have problem and I need Help: 1. Axapta using English Language in all system 2. I need write something in Russian Language. When I use Russian Keyboard and I wriet somethings in Axapta fields is ok, but after this Russian words was change and I see only symbol likely this ??????? (query) 3. In MS SQL database in the fields I see words likely this symbol ??????? (query) Please send my all information how I can write something in different Languages in this same Axapta - I need write simultaneously in 2 Languages. Please send answer on ma email: search1234@wp.pl Thank...

time/date stamp on email
i used microsoft outlook for email. i sent an email to another outlook user and i wanted to find out if he's read it or not. is there any way to view the time/date that the person reads the email ? if you requested a read receipt and if the recipient uses a program that is capable of replying, yes. otherwise, no. -- Diane Poremsky [MVP - Outlook] Author, Teach Yourself Outlook 2003 in 24 Hours Coauthor, OneNote 2003 for Windows (Visual QuickStart Guide) Need Help with Common Tasks? http://www.outlook-tips.net/beginner/ Outlook Tips: http://www.outlook-tips.net/ Outlook & Exchang...

CDialog::DoModal() (2)
Few days ago I have asked the same question but didn't get any answers. :( This is my problem: I have written plugin for one app and it crashes here: //dlgcore.cpp CDialog::DoModal() { .... if (m_nFlags & WF_CONTINUEMODAL) { // enter modal loop DWORD dwFlags = MLF_SHOWONIDLE; if (GetStyle() & DS_NOIDLEMSG) dwFlags |= MLF_NOIDLEMSG; //It crashes on the line below VERIFY(RunModalLoop(dwFlags) == m_nModalResult); } .... } I belive that possible cause was that I didn't initialized MFC in any way. I have noticed this in my other pro...