IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New I'm playing with Access
And I ran into a problem already, that I don't even know how to look up.

I'm entering books I've read over the years as a database to play with, but some of my old lists only have the year I've read them, with no date.

I tried entering just the year in the date slot, but it fails. I'm using date/time as the parameter for that slot. If I use number it doesn't seem to work.

Is there a way to make Access allow me to only enter the year, without the rest of the data? I already tried 0/0/1974 and it failed also.

Thanks in advance for any help.

Nightowl >8#


"To become different from what we are, we must have some awareness of what we are."
Eric Hoffer
New Number format?
Right click and set the format to a custom date, like MM/YYYY and supply a default value (should be somewhere on the property sheet). Custom dates typically are entered either as plain MM/YYYY or maybe %MM/%YYYY (haven't done Access in some time and I ain't booting Windows to find out).
-drl
New data type
Sounds like you've specified the field to a date data type. That's going to require the full date, not just the year. You can change it to a number or text data type, or just enter 1/1/1974, or some other arbritrary date. If it were me, I'd probably do the latter since it sounds like you have some complete date data. If you want to perform functions on that date field later, like buidling a report of average number of books read in every month of the year, you're going to want that to be a date data type.

HTH

Disclaimer: I don't and won't use Access, I'm speaking from general database design experience.
-----
Steve
New What Steve said
I would suggest that if you go for a different format, make it a number, and then enter dates in the format YYYYMMDD. The reason is to make it easy to extract out the year, month, etc so that whatever data you have, you can use.

You might want to solve this by having 2 fields, one for the date if you have it, and one for the best description of the date. You can then later figure out how to fill in the best description of the date from dates where you have them. When you come to it, figuring out that query will introduce you to some important concepts (UPDATE, NULL, and type conversion functions). Which is, after all, what you wanted, right? :-)

Cheers,
Ben
"good ideas and bad code build communities, the other three combinations do not"
- [link|http://archives.real-time.com/pipermail/cocoon-devel/2000-October/003023.html|Stefano Mazzocchi]
New Data Types
They only give me date/time as an option, or text, or number. I don't see anything where I can customize the date. Grrr.

I thought about making one column the year, and the next the date, would that work, is that what you are explaining, Ben?

My biggest problem is that I wanted the database to sort by date, (date and year), and this is causing the 1974's not to follow that sort pattern, well, it won't even take them without some date. Grrr.

And yes, I want to learn about it, by query do you mean making a report? If I wanted to look this up in my book, any idea what to look under? There is nothing under customize data type.

Nightowl >8#


"To become different from what we are, we must have some awareness of what we are."
Eric Hoffer
New Date is closer to number than to text.
The Nightowl plaintively hoots:
They only give me date/time as an option, or text, or number. I don't see anything where I can customize the date. Grrr.
Sheesh, woman, DO try to learn to read a bit more constructively -- everybody has been talking about the NUMBER datatype as an alternative. You just enter a number that happens to ALSO BE a date, seewhatimean?

Then you preferably add a constraint (look up that word in the help; if it isn't there, it's the help file that sucks, not my advice; then you'll have to think of all the synonyms for "constraint" that you can imagine, and try those) that says the value in this number field has to be between, say, 19000000 (nineteen million) and 21000000 (twenty-one million). Your choice as to whether the constraint is on the data table itself, the editing window, or wherever else Access lets you put it... But "your choice" doesn't necessarily mean that it's unimportant; think a little about which would be the most logical and sensible place to put it.

And if you go that way, for all that is good and holy in the world, DO follow Ben's suggestion to use the YYYMMDD format, NOT the idiotic American MMDDYYY one. (In case you're wondering why, think about sorting.) (*)


I thought about making one column the year, and the next the date, would that work, is that what you are explaining, Ben?
That would also work(**), but would be a bit more work to make into a whole date for reporting, sorting, and comparing... With the single-number format (which Ben SAID he was talking about; learn to frigging READ, woman!), you get the opposite problem of grouping on just the year or month portion of the number.

On balance, though, I tend to agree with Ben that the single-number model is easier and better.


My biggest problem is that I wanted the database to sort by date, (date and year), and this is causing the 1974's not to follow that sort pattern, well, it won't even take them without some date. Grrr.
So why on Earth hasn't it occurred to you to just use some fake date?!? Preferably one that isn't too likely to be an actual true date... Like, how often do you finish a book on Christmas Day? Or, say, New Year's Day? (Even if you DO occassionally do that, just lie and pretend that you finished those ones on the second of January.)

If you go with the number-as-fake-date idea, you can of course say 'YYYY0000' where you can remember only the year, or 'YYYYMM00' where you have the month but lack the day.


And yes, I want to learn about it, by query do you mean making a report? If I wanted to look this up in my book, any idea what to look under? There is nothing under customize data type.
Tried looking under "Query"? (Again, if it isn't there, the help file sucks.)

Sheesh, ever tried just BROWSING a book; flip a few pages at a time and skim, until you get to something that looks like it could be approximately what you're after, then slow down and flip somewhat fewer pages at a time and skim somewhat more thoroughly, until you're actually reading a page that is actually about what you were after? If not, it's high time you started; knowing how to do that is really the least that can be expected of anybody over, say, twelve.

HTH!



(*): And in case you've ever wondered about the "It's MIDDLE-ENDIAN!" LRPDism, wonder no more -- it's about the US date format.

(**): Provided you actually meant "thought about making one column the year, and the next the month, and the next the day of the month"; what would "and the next the date" be supposed to mean, otherwise? Yet another column with the same problem you already have...?


   [link|mailto:MyUserId@MyISP.CountryCode|Christian R. Conrad]
(I live in Finland, and my e-mail in-box is at the Saunalahti company.)
You know you're doing good work when you get flamed by an idiot. -- [link|http://www.theregister.co.uk/content/35/34218.html|Andrew Wittbrodt]
New Re: Date is closer to number than to text.
Sheesh, woman, DO try to learn to read a bit more constructively -- everybody has been talking about the NUMBER datatype as an alternative. You just enter a number that happens to ALSO BE a date, seewhatimean?


When I change the datatype to number, it bunches all the numbers up and it no longer looks like a date, plus it takes away the whole year and only gives me the last two digits.

Then you preferably add a constraint (look up that word in the help; if it isn't there, it's the help file that sucks, not my advice; then you'll have to think of all the synonyms for "constraint" that you can imagine, and try those) that says the value in this number field has to be between, say, 19000000 (nineteen million) and 21000000 (twenty-one million). Your choice as to whether the constraint is on the data table itself, the editing window, or wherever else Access lets you put it... But "your choice" doesn't necessarily mean that it's unimportant; think a little about which would be the most logical and sensible place to put it.


I found constraint, but can't seem to locate the Query tab which is what it's telling me to use. I'm looking for it now.

And if you go that way, for all that is good and holy in the world, DO follow Ben's suggestion to use the YYYMMDD format, NOT the idiotic American MMDDYYY one. (In case you're wondering why, think about sorting.) (*)


I would LOVE to change the format like you are suggesting, but that was my original problem, I can't find anywhere to change the date format to something else. That is what I'm looking for.

On balance, though, I tend to agree with Ben that the single-number model is easier and better.


I do too, and I would rather go with it.

My biggest problem is that I wanted the database to sort by date, (date and year), and this is causing the 1974's not to follow that sort pattern, well, it won't even take them without some date. Grrr.
So why on Earth hasn't it occurred to you to just use some fake date?!? Preferably one that isn't too likely to be an actual true date... Like, how often do you finish a book on Christmas Day? Or, say, New Year's Day? (Even if you DO occassionally do that, just lie and pretend that you finished those ones on the second of January.)


Edit: I was thinking about making up dates, but really didn't want to.

If you go with the number-as-fake-date idea, you can of course say 'YYYY0000' where you can remember only the year, or 'YYYYMM00' where you have the month but lack the day.


I'm hoping that will work if I can get the format changed to YYYYMMDD. That's what I can't seem to find, is an option to select that format.

Sheesh, ever tried just BROWSING a book; flip a few pages at a time and skim, until you get to something that looks like it could be approximately what you're after, then slow down and flip somewhat fewer pages at a time and skim somewhat more thoroughly, until you're actually reading a page that is actually about what you were after? If not, it's high time you started; knowing how to do that is really the least that can be expected of anybody over, say, twelve.


Yes, I've been browsing it, but I'm not sure what the thing I want to do is called, so I'm not locating much. I"m still browsing it though.

I'm still trying to solve the problem, of course, I don't know for sure that Access can accomplish it, but I believe it probably can. I'm still learning what Access can do.

Thanks for your input.

Nightowl >8#


"To become different from what we are, we must have some awareness of what we are."
Eric Hoffer
Expand Edited by Nightowl Feb. 24, 2004, 05:36:45 PM EST
New Okay, I got out the really technical book
But the only place I can find where I can change date format is in Excel. There isn't anything about being able to do it on Access, and this book is Microsoft Office '97 Professional.

Is it possible that I can't change the date format in Access????

Edit: Never mind, I called my brother, who is pretty good with Access, and he explained that I have to hit F-6 to get to the options. Not sure why it didn't say that in the stupid book.

Nightowl >8#


"To become different from what we are, we must have some awareness of what we are."
Eric Hoffer
Expand Edited by Nightowl Feb. 24, 2004, 05:47:43 PM EST
Expand Edited by Nightowl Feb. 24, 2004, 05:48:50 PM EST
New Stupid Book
Finally found it on page 644, but it doesn't say anything about how to get to the box to change it, just that you can. Also it says you can make custom formats, but doesn't tell you how.

I wish someday someone would make a manual that really HELPS!

Nightowl >8#

Edit: changed people to someone.


"To become different from what we are, we must have some awareness of what we are."
Eric Hoffer
Expand Edited by Nightowl Feb. 24, 2004, 06:01:08 PM EST
New Re: Stupid Book
That has to do with how and why big computer books are written and sold. The only entity that really has any interest at all (even though they are uninterested) in writing good doc for access is, well, microsoft. (yes, I know, nobody has to tell me about how access doc really is).

Usually, as here, the cynical explanation is the preferred on (hi ashton).
WWJD? JWRTFM.
New My aggregate reply
Did you install the northwind sample? If not, do so. Look at that, you can see how a lot of stuff works.

From what you said about things like average books read per month, you don't need the day of the month. Suggestions about using a number are good. If you don't want to parse the year and month out of a single number, use 2 numeric fields for month and year. To extract the stuff you already put into the date field and populate these 2 new ones, add the fields in design view, make an update query that uses the month() and year() functions.

There are other correct ways to do this. I suggest this approach because I think you'll be better off having separate month/year fields than having to extract them from one field.

I can't recommend an access book, I haven't bought one since access 2.0 (which was far and away the best version, after they purchased foxpro for its index technology and before too much fluff and cruft were added). Go to the bookstore of your choice and browse. At this level, it probably doesn't matter what book you look at.

Access is OK for what you're doing with it. Don't try to use it for real in a multiuser environment though.


Also, what Conrad said.
WWJD? JWRTFM.
New Re: My aggregate reply
Did you install the northwind sample? If not, do so. Look at that, you can see how a lot of stuff works.


Yes, we finally got Northwind installed, but I hadn't gotten around to looking at it. I plan to, hopefully soon. This was just something that happened to come up that I thought I could try and play with Access and accomplish the project at the same time. :)

From what you said about things like average books read per month, you don't need the day of the month. Suggestions about using a number are good. If you don't want to parse the year and month out of a single number, use 2 numeric fields for month and year. To extract the stuff you already put into the date field and populate these 2 new ones, add the fields in design view, make an update query that uses the month() and year() functions.


I really don't do an average of books per month, if I ever count it's per year, but the data base was only to be able to pull up a given title and the date read, so it wouldn't need all that extra field stuff, as long as I could sort it chronologically.

As I stated in another post, my husband helped me find out how to customize the field. :)

I can't recommend an access book, I haven't bought one since access 2.0 (which was far and away the best version, after they purchased foxpro for its index technology and before too much fluff and cruft were added). Go to the bookstore of your choice and browse. At this level, it probably doesn't matter what book you look at.


I have some awesome Access books, but unfortunately, I didn't know what to be looking under. Custom doesn't bring it up, data-field only brought up Excel, etc. I'm sure somewhere in one of the books, it's in there, but not without extensive searching. It would have been nice though for it to be listed under data-types, which is where I would have thought it would be, but it wasn't. The only book I didn't look in, (and probably should have), is my Complete Idiot's Guide to Access. ;) But I figured this was a more complex task and might not be covered in there.

I'm only trying to learn Access better so that I can say with confidence on a job interview, that I know the basics of how to use it.

Thanks!

Nightowl >8#



"To become different from what we are, we must have some awareness of what we are."
Eric Hoffer
New Solved it!
John helped me figure out how to make a customized field.

We took a text field and gave it an input mask of 0000\\-00\\-00

It's finally working, YAY! Thanks for all the help.

Nightowl >8#


"To become different from what we are, we must have some awareness of what we are."
Eric Hoffer
New You could have entered a date
with the year and like 1/1/2004 and then ignored the day and month. When doing a query you can do a Year([DateColumn]) where DateColumn is the name of the field you put the date into and then sort by that.

As others suggested, you could have created a number field of four digits and then sorted by that. Would have been a lot easier for you.

Text fields take longer to sort by, numbers are faster to sort by. If you get a lot of records the database is going to bog down in speed when sorting by that text field. If it is a small database, you may not have to worry about it.



"Lady I only speak two languages, English and Bad English!" - Corbin Dallas "The Fifth Element"

     I'm playing with Access - (Nightowl) - (13)
         Number format? - (deSitter)
         data type - (Steve Lowe)
         What Steve said - (ben_tilly) - (6)
             Data Types - (Nightowl) - (5)
                 Date is closer to number than to text. - (CRConrad) - (4)
                     Re: Date is closer to number than to text. - (Nightowl)
                     Okay, I got out the really technical book - (Nightowl) - (2)
                         Stupid Book - (Nightowl) - (1)
                             Re: Stupid Book - (rickw)
         My aggregate reply - (rickw) - (1)
             Re: My aggregate reply - (Nightowl)
         Solved it! - (Nightowl) - (1)
             You could have entered a date - (orion)

It's like you ran OCR on a photo of a Scrabble board from a game where JavaScript reserved words counted for triple points.
62 ms