Kamis, 29 Desember 2011

RE: [MS_AccessPros] RE: Date field

 

Crystal,

Thanks for clarifying. Now I understand the reasoning. For now I am going
to keep them together and based on what I learned yesterday I should be
fine. I am going to keep you code just in case.

Bill Singer

MN

From: MS_Access_Professionals@yahoogroups.com
[mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of Crystal
Sent: Wednesday, December 28, 2011 11:06 PM
To: MS_Access_Professionals@yahoogroups.com
Subject: Re: [MS_AccessPros] RE: Date field

Hi Bill,

I only store date in 3 parts for birthdays, anniversaries, or other dates
where parts are known and parts may not be. I should have made that clear,
thanks for bringing it up ;) Generally, it is best to store date AND time
all together.

It is easy to pull parts of a date out. for instance:

MonthLongName: Format([DateField],"mmmm")
MonthShortName: Format([DateField],"mmm")

MonthNumber: Month([DateField])

~~~

LongYearString: Format([DateField],"yyyy")
ShortYearString: Format([DateField],"yy")

YearNumber: Year([DateField])

You can also use the DatePart dfunction to pull parts out of a date

~~~

now that you have some basic functions, you can combine year and month like
this:

YearMonth: Format( [DateField], "yy-mm")

The Format function always returns a string, not a number.

Year, Month, and Day functions return numbers.

Warm Regards,
Crystal

Access Basics by Crystal (Bill Mosca's site)
http://thatlldoit.com
Free 100-page book that covers essentials in Access

*
(: have an awesome day :)
*

________________________________
From: Duane Hookom

Bill,Not sure of the context of Crystal's "own date field" but a date is a
date is a date. I would not consider changing a date field to anything else.
I might apply different formats or extract parts of the date with the large
number of date related functions. If I was tracking birthdays and had only
the day and month (no year), I might consider using fields for day and month
since a date field stores the year. Duane HookomMS Access MVP

From: Bill.Singer@at-group.net <mailto:Bill.Singer%40at-group.net>
Date: Wed, 28 Dec 2011 09:19:03 -0600
Subject: [MS_AccessPros] RE: Date field

I watched one of Crystal's videos and she created her own date field
rather

than use the date formatted field that access has. She created 3 separate

fields for month, day and year. I am going to be pulling some data out of a

database by month and I am wondering if creating my own date fields is going

to make this easier. I am thinking it will be easier to pull data for

February if I just run a query for all data where the month equals "2" and

the year equals "2012".

Any thoughts?

Bill

Minnesota

[Non-text portions of this message have been removed]

_____

No virus found in this message.
Checked by AVG - www.avg.com
Version: 2012.0.1901 / Virus Database: 2109/4709 - Release Date: 12/28/11

[Non-text portions of this message have been removed]

__._,_.___
Recent Activity:
MARKETPLACE

Stay on top of your group activity without leaving the page you're on - Get the Yahoo! Toolbar now.

.

__,_._,___

Tidak ada komentar:

Posting Komentar