473,657 Members | 2,659 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How do I get the full month name and not just the number?

jm
I am trying to use datepart to get the real name of the month like
"April" or "APR" not just "4." I could not find it in the
documentation. Sorry. Thank you.
Nov 12 '05 #1
13 3140
jm wrote:
I am trying to use datepart to get the real name of the month like
"April" or "APR" not just "4." I could not find it in the
documentation. Sorry. Thank you.


Try these out for size. Go to the immediate window and enter
? Format(Date()," mmm")
? Format(Date()," mmmm")
? Format(Date()," mmmmm")
? Format(Date()," mmmmmm")

Nov 12 '05 #2
Salad wrote:
jm wrote:
I am trying to use datepart to get the real name of the month like
"April" or "APR" not just "4." I could not find it in the
documentation. Sorry. Thank you.

Try these out for size. Go to the immediate window and enter
? Format(Date()," mmm")
? Format(Date()," mmmm")
? Format(Date()," mmmmm")
? Format(Date()," mmmmmm")


I think you just want the 4 "m"s, I've not seen what the 5 or 6 do.

Speaking of which, I just ran an import and export from one of my
client's servers in Baku, in the export format the dates are in medium
date format. The month names came out in Turkish as the computer was set
to Turkish in Windows. Now the import, which imports dates in medium
date format in English, worked fine, given that... is it possible to
specify a date format that will always be in English regardless of the
computer's country settings?

I could run a function on the dates with ye olde faithful (Allen will
love this) mid("xxxJanFebM arAprMayJunJulA ugSepOctNovDec" ,Month(date)*3+ 1,3)
but I was just wondering if Access could do it on it's todd.

--
Error reading sig - A)bort R)etry I)nfluence with large hammer
Nov 12 '05 #3
"Trevor Best" <nospam@localho st> replied in message
news:40******** **************@ auth.uk.news.ea synet.net...
I could run a function on the dates with ye olde faithful
(Allen will love this)
mid("xxxJanFebM arAprMayJunJulA ugSepOctNovDec" ,Month(date)*3+ 1,3)


Aaaaaaaaaaagh No!!!!

:-)

--
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.
Nov 12 '05 #4
Trevor,
Date datatypes are just doubles formatted to look like dates.

I would have thought it would be easier in the long run to use this fact
rather than worry about localisation issues.

(but then what would I know, not having any client servers in Baku <g>)

--
Terry Kreft
MVP Microsoft Access

"Trevor Best" <nospam@localho st> wrote in message
news:40******** **************@ auth.uk.news.ea synet.net...
Salad wrote:
jm wrote:
I am trying to use datepart to get the real name of the month like
"April" or "APR" not just "4." I could not find it in the
documentation. Sorry. Thank you.

Try these out for size. Go to the immediate window and enter
? Format(Date()," mmm")
? Format(Date()," mmmm")
? Format(Date()," mmmmm")
? Format(Date()," mmmmmm")


I think you just want the 4 "m"s, I've not seen what the 5 or 6 do.

Speaking of which, I just ran an import and export from one of my
client's servers in Baku, in the export format the dates are in medium
date format. The month names came out in Turkish as the computer was set
to Turkish in Windows. Now the import, which imports dates in medium
date format in English, worked fine, given that... is it possible to
specify a date format that will always be in English regardless of the
computer's country settings?

I could run a function on the dates with ye olde faithful (Allen will
love this)

mid("xxxJanFebM arAprMayJunJulA ugSepOctNovDec" ,Month(date)*3+ 1,3) but I was just wondering if Access could do it on it's todd.

--
Error reading sig - A)bort R)etry I)nfluence with large hammer

Nov 12 '05 #5
Trevor Best wrote:
Salad wrote:
jm wrote:
I am trying to use datepart to get the real name of the month like
"April" or "APR" not just "4." I could not find it in the
documentation. Sorry. Thank you.


Try these out for size. Go to the immediate window and enter
? Format(Date()," mmm")
? Format(Date()," mmmm")
? Format(Date()," mmmmm")
? Format(Date()," mmmmmm")

I think you just want the 4 "m"s, I've not seen what the 5 or 6 do.


I got carried away....just in case he wanted either APR/April as well as
the month number 4/04 at the same time <g>.

Regarding your international format question, I haven't dealt with
international date/currency problems. I can only pass back what MS has
said in help....

"Note Transferring data between computers with different regional
settings can result in incorrect currency data. For example, when using
the Currency format, a value of 5,47 kr on a computer set for Denmark
converts to $5.47 on a computer set for the United States. To prevent
such errors, define a custom format for the currency, such as #,## kr.
The custom format overrides the regional settings specified in the
Windows Control Panel. Similar problems won't occur when transferring
standard number, date, or time data between computers with different
regional settings."

I have not experimented in the import/export of international
values...but I don't understand how a custom format would be of much use
if the table stored US$, Mexican pesos, and Euros in a field. Do you
have separate fields based on the country of origin in displaying the
data? Too bad MS didn't provide some more verbose help and maybe a few
examples.

IOW, if you import the currency values from Denmark using the format
#,## kr, is the Denmark value stored internally as a value from Denmark
and if you import a currency with USD, it is in US$ format internally?
Do you set the field as type currency but leave the table's format row
blank in the property sheet so that it displays correctly?

I attemped the following with little success
? Format(5.47,"#, ## kr")
returns
5 kr

? Format(5,47,"#, ## kr")
returns a type mismatch.

Nov 12 '05 #6
"Terry Kreft" <te*********@mp s.co.uk> wrote in
news:HI******** ************@ka roo.co.uk:
Trevor,
Date datatypes are just doubles formatted to look like dates.


Terry

I think I have never disagreed with you before.

Surely "Date datatypes are just doubles" is too simple. If they are just
doubles do they have the same range? Do they have the same precision? Do
their operations behave in the same way (What about 0 - 0.5?)?

Would an 8 byte string be a double?

I think it is more appropriate to say that dates are stored as 8 bytes, as
doubles are.

--
Lyle
(for e-mail refer to http://ffdba.com/contacts.htm)
Nov 12 '05 #7
Lyle,
I'm sure we have disagreed before, I'd be worried if we hadn't. That would
be boring and imply that one (or possibly both) of us is too smart for their
own good <g>.
To the objection
------------------
Hmmm, ok

From Access help

"... Double (double-precision floating-point) variables are stored as IEEE
64-bit (8-byte) floating-point numbers ranging in value
from -1.7976931348623 1E308 to -4.9406564584124 7E-324 for negative values and
from 4.9406564584124 7E-324 to 1.7976931348623 2E308 for positive values. ..."

"... Date variables are stored as IEEE 64-bit (8-byte) floating-point
numbers that represent dates ranging from 1 January 100 to 31 December 9999
and times from 0:00:00 to 23:59:59. ..."

So they are both IEEE 64-bit (8-byte) floating point numbers, the difference
is that a double has a wider range than a date therefore date is a subset of
double.

So I don't think I was too simplistic "dates are simply doubles" is correct
and was probably all that was required in context of the OP but then saying
"but not all doubles are dates", I agree, would have given the complete
picture.

How about: Date datatype and Double datatype are both 8 byte floating
numbers, it is possible to convert a date datatype variable to a double
datatype variable and within certain restrictions manipulate a date datatype
as if it were a double.
My conclusion would then be:-
You can Double Date but you can't necessarily Date Double.
--
Terry Kreft
MVP Microsoft Access
"Lyle Fairfield" <Mi************ @Invalid.Com> wrote in message
news:Xn******** ***********@130 .133.1.4...
"Terry Kreft" <te*********@mp s.co.uk> wrote in
news:HI******** ************@ka roo.co.uk:
Trevor,
Date datatypes are just doubles formatted to look like dates.


Terry

I think I have never disagreed with you before.

Surely "Date datatypes are just doubles" is too simple. If they are just
doubles do they have the same range? Do they have the same precision? Do
their operations behave in the same way (What about 0 - 0.5?)?

Would an 8 byte string be a double?

I think it is more appropriate to say that dates are stored as 8 bytes, as
doubles are.

--
Lyle
(for e-mail refer to http://ffdba.com/contacts.htm)

Nov 12 '05 #8
"Terry Kreft" <te*********@mp s.co.uk> wrote in
news:Sr******** ************@ka roo.co.uk:
Lyle,
I'm sure we have disagreed before, I'd be worried if we hadn't. That
would be boring and imply that one (or possibly both) of us is too smart
for their own good <g>.
To the objection
------------------
Hmmm, ok

From Access help

"... Double (double-precision floating-point) variables are stored as
IEEE 64-bit (8-byte) floating-point numbers ranging in value
from -1.7976931348623 1E308 to -4.9406564584124 7E-324 for negative values
and from 4.9406564584124 7E-324 to 1.7976931348623 2E308 for positive
values. ..."

"... Date variables are stored as IEEE 64-bit (8-byte) floating-point
numbers that represent dates ranging from 1 January 100 to 31 December
9999 and times from 0:00:00 to 23:59:59. ..."

So they are both IEEE 64-bit (8-byte) floating point numbers, the
difference is that a double has a wider range than a date therefore date
is a subset of double.

So I don't think I was too simplistic "dates are simply doubles" is
correct and was probably all that was required in context of the OP but
then saying "but not all doubles are dates", I agree, would have given
the complete picture.

How about: Date datatype and Double datatype are both 8 byte floating
numbers, it is possible to convert a date datatype variable to a double
datatype variable and within certain restrictions manipulate a date
datatype as if it were a double.
My conclusion would then be:-
You can Double Date but you can't necessarily Date Double.


Great. I agree and ...
I'll bring a redhead!

--
Lyle
(for e-mail refer to http://ffdba.com/contacts.htm)
Nov 12 '05 #9
Mines brunette, you get the first round ... <g>

--
Terry Kreft
MVP Microsoft Access
"Lyle Fairfield" <Mi************ @Invalid.Com> wrote in message
news:Xn******** ***********@130 .133.1.4...
"Terry Kreft" <te*********@mp s.co.uk> wrote in
news:Sr******** ************@ka roo.co.uk:
Lyle,
I'm sure we have disagreed before, I'd be worried if we hadn't. That
would be boring and imply that one (or possibly both) of us is too smart
for their own good <g>.
To the objection
------------------
Hmmm, ok

From Access help

"... Double (double-precision floating-point) variables are stored as
IEEE 64-bit (8-byte) floating-point numbers ranging in value
from -1.7976931348623 1E308 to -4.9406564584124 7E-324 for negative values
and from 4.9406564584124 7E-324 to 1.7976931348623 2E308 for positive
values. ..."

"... Date variables are stored as IEEE 64-bit (8-byte) floating-point
numbers that represent dates ranging from 1 January 100 to 31 December
9999 and times from 0:00:00 to 23:59:59. ..."

So they are both IEEE 64-bit (8-byte) floating point numbers, the
difference is that a double has a wider range than a date therefore date
is a subset of double.

So I don't think I was too simplistic "dates are simply doubles" is
correct and was probably all that was required in context of the OP but
then saying "but not all doubles are dates", I agree, would have given
the complete picture.

How about: Date datatype and Double datatype are both 8 byte floating
numbers, it is possible to convert a date datatype variable to a double
datatype variable and within certain restrictions manipulate a date
datatype as if it were a double.
My conclusion would then be:-
You can Double Date but you can't necessarily Date Double.


Great. I agree and ...
I'll bring a redhead!

--
Lyle
(for e-mail refer to http://ffdba.com/contacts.htm)

Nov 12 '05 #10

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

Similar topics

13
480
by: jm | last post by:
I am trying to use datepart to get the real name of the month like "April" or "APR" not just "4." I could not find it in the documentation. Sorry. Thank you.
5
8583
by: Ataru Morooka | last post by:
Hi, my table has to have a column with the months names (january, february...). When I order it by month it is ordered alphabetically and that's not what I need. Reading this ng I found someone suggesting to replace names with numbers (datatype: number) so jan is 1, feb is 2 and so on...and then to ma ke a query using the format command. I wrote an example: SELECT Format(,"mmmm") AS NameMonths
14
2569
by: vicky | last post by:
SUMMARY: THREE YEARS of and continuing MENTAL TORTURE, TERRORISM, SADISM and BLATANT human rights violations by FBI SADISTS and PERVERTS. Please SAVE this post on your hard disks or email account and also bookmark it because the FBI sadists are gonna force the websites to remove this posting for good. I posted this column to pretty much all "active newsgroups" three weeks ago but the FBI "ARM TWISTED" and "FORCED" google management to...
6
8976
by: Ante Perkovic | last post by:
Hi, How to declare datetime object and set it to my birthday, first or last day of this month or any other date. I can't find any examples in VS.NET help! BTW, what is the difference between date and datetime classes? Please, help
2
6793
by: troddy | last post by:
I am using the DatePart funtion in a query to extract the day, month and year in separate fields in a query. The function works fine but I am only getting a number for the month even if the field type is a long date and the month is stored in the table. I tried the following to try and get the name of the month to work. DateTest: Format(DatePart("m",),"mmmm") The DateAffirmed field had a date stored of 16/03/2006.
22
31187
by: Stan | last post by:
I am working with Access 2003 on a computer running XP. I am new at using Access. I have a Db with a date field stored as mm/dd/yyyy. I need a Query that will prompt for the month, ie. 6 for June, and will return all records in that month.
5
14446
by: girl23 | last post by:
I am using a function prototype to convert month number to month name. basically you ask the compiler to enter int from 1 to 12 and then convert it. printMonth ( number ); is the prototype and using switch this is what i did case 'm': printf( "What month? Enter a number between 1 and 12: " ); scanf( "%d%c", &number, &tmp ); printMonth( number ); break;
5
5500
by: Seb | last post by:
I want to count activity in a given month. I'm trying to do so with the linq code below however it reports: Error 1 'a' is inaccessible due to its protection level var ActivityByMonths = from a in db.ActivityDatas where a.BeginDateTime >= From && a.BeginDateTime <= To where a.SubActivityId == sat group a by a.BeginDateTime.Month into mg select new { a.BeginDateTime.Month, count = mg.Count() };
0
8385
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8723
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8502
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8602
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7316
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4300
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1941
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1601
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.