473,789 Members | 2,431 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Hundred Year Date

Tim
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
Nov 18 '05 #1
8 4715
I'm not familiar with the "hundred year date format", What would the end format look like for '8/11/2004' ?

"Tim" <tr*********@ma jesticstar.com> wrote in message news:F2******** *************** ***********@mic rosoft.com...
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

Nov 18 '05 #2
=?Utf-8?B?VGlt?= <tr*********@ma jesticstar.com> wrote in
news:F2******** *************** ***********@mic rosoft.com:
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!

You can use the FormatDateTime or Format function.

--
Lucas Tam (RE********@rog ers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/
Nov 18 '05 #3
Tim
The hundred year date for 8/11/2004 would be 38209

"Raterus" wrote:
I'm not familiar with the "hundred year date format", What would the end format look like for '8/11/2004' ?

"Tim" <tr*********@ma jesticstar.com> wrote in message news:F2******** *************** ***********@mic rosoft.com...
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

Nov 18 '05 #4
Tim
The hundred year date for 8/11/2004 would be 38209

"Raterus" wrote:
I'm not familiar with the "hundred year date format", What would the end format look like for '8/11/2004' ?

"Tim" <tr*********@ma jesticstar.com> wrote in message news:F2******** *************** ***********@mic rosoft.com...
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

Nov 18 '05 #5
"Tim" <tr*********@ma jesticstar.com> wrote in message
news:F2******** *************** ***********@mic rosoft.com...
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.

"Hundred year format"??? What on earth is that?
Nov 18 '05 #6
I do believe this is what you are after

Dim dt As DateTime = #8/11/2004#
Dim d As Long
d = dt.ToOADate

"Tim" <tr*********@ma jesticstar.com> wrote in message news:C0******** *************** ***********@mic rosoft.com...
The hundred year date for 8/11/2004 would be 38209

"Raterus" wrote:
I'm not familiar with the "hundred year date format", What would the end format look like for '8/11/2004' ?

"Tim" <tr*********@ma jesticstar.com> wrote in message news:F2******** *************** ***********@mic rosoft.com...
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

Nov 18 '05 #7
I'm just curious, but does anybody know how 8/11/2004 becomes 38209? What's the basis of this hundred year format?

Chris
--------------------
Thread-Topic: Hundred Year Date
thread-index: AcR/3sSk1DSrctEoTmC z2HV71rYN/w==
X-WBNR-Posting-Host: 68.20.202.149
From: =?Utf-8?B?VGlt?= <tr*********@ma jesticstar.com>
References: <F2************ *************** *******@microso ft.com> <u8************ *@TK2MSFTNGP11. phx.gbl>
Subject: Re: Hundred Year Date
Date: Wed, 11 Aug 2004 13:07:03 -0700
Lines: 13
Message-ID: <C0************ *************** *******@microso ft.com>
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups: microsoft.publi c.dotnet.framew ork.aspnet
NNTP-Posting-Host: TK2MSFTNGXA03.p hx.gbl 10.40.1.29
Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG XA03.phx.gbl
Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.framew ork.aspnet:2537 09
X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.aspnet

The hundred year date for 8/11/2004 would be 38209

"Raterus" wrote:
I'm not familiar with the "hundred year date format", What would the end format look like for '8/11/2004' ?

"Tim" <tr*********@ma jesticstar.com> wrote in message news:F2******** *************** ***********@mic rosoft.com...
> 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

Nov 18 '05 #8
Chris Moore wrote:
I'm just curious, but does anybody know how 8/11/2004 becomes 38209? What's the basis of this hundred year format?
It's the number of days since some point near the start of 1900.

See the docs for DateTime.ToOADa te().

There may be a bit of discrepancy - the OP said that 8/11/2004 should be
38209.

ToOADate() returns 38210 for that date.

Chris
--------------------
Thread-Topic: Hundred Year Date
thread-index: AcR/3sSk1DSrctEoTmC z2HV71rYN/w==
X-WBNR-Posting-Host: 68.20.202.149
From: =?Utf-8?B?VGlt?= <tr*********@ma jesticstar.com>
References: <F2************ *************** *******@microso ft.com> <u8************ *@TK2MSFTNGP11. phx.gbl>
Subject: Re: Hundred Year Date
Date: Wed, 11 Aug 2004 13:07:03 -0700
Lines: 13
Message-ID: <C0************ *************** *******@microso ft.com>
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups: microsoft.publi c.dotnet.framew ork.aspnet
NNTP-Posting-Host: TK2MSFTNGXA03.p hx.gbl 10.40.1.29
Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG XA03.phx.gbl
Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.framew ork.aspnet:2537 09
X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.aspnet

The hundred year date for 8/11/2004 would be 38209

"Raterus" wrote:

I'm not familiar with the "hundred year date format", What would the end format look like for '8/11/2004' ?

"Tim" <tr*********@ma jesticstar.com> wrote in message news:F2******** *************** ***********@mic rosoft.com...

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


--
mikeb
Nov 18 '05 #9

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

Similar topics

4
9344
by: John Hunter | last post by:
>>> from datetime import date >>> dt = date(1005,1,1) >>> print dt.strftime('%Y') Traceback (most recent call last): File "<stdin>", line 1, in ? ValueError: year=1005 is before 1900; the datetime strftime() methods require year >= 1900 Does anyone know of a datetime string formatter that can handles strftime format strings over the full range that datetime objects support?
7
1909
by: Fendi Baba | last post by:
The function is called from opencalendar(targetfield). Thanks for any hints on what could be the problem. .............................................................. var decimalPointDelimiter = ".";
2
2430
by: Douglas | last post by:
I have a Vehicle MOT field in my table which i have as a Date field I dont really want to hold the year, just 'dd mmm' as MOTs are the same date every year. I have the field on my form as a listbox holding all the dates of the year, except 29 Feb which i dont need anyway. When i select a value from the list i.e. 14 May and it stores it in the table i believe it stores the current year as well i.e 14 May 2004 The problem now is how do i...
6
3266
by: PMBragg | last post by:
Thank you everyone that helped me with my DateSerial question. I really do appreciate it. Now my accountant has told I need to pull the inventory for just the year I'm depreciating. Is there a way to isolate by my field, to get the Year I need? Michael
2
3565
by: Bernd Hohmann | last post by:
Dear collegues, small query problem. A table (simplified example)... customer as char(5) inv_date as date amount as double
1
6613
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 (((tblSideJob.Date)=Year(Date()))); This does not display any records at all. The field tblSideJob.Date is a date/time field
5
3689
by: Kasrav | last post by:
I have another problem hopeful am not bothering you guys too much if u can help that would be wonderful. I have this code here def year2(): print'This program validates days and months of the year' day = validate('Enter dayNumber: ',1,31); month = validate('Enter monthNumber: ',1,12); while(True): if (month == 1 or month == 3 or month == 5 or month == 7 or month == 8 or month == 10 or month == 12 and day...
6
6305
craigfr
by: craigfr | last post by:
I am making a graph comparing last year's defect data with YTD defect data. Our fiscal year starts Nov.1 and ends Oct.31. To get the YTD, I started used a simple date serial criteria: Between DateSerial(Year(Date())-1,11,1) And Date() This works, but only for 10 months out of the year. If your'e in December, it will calculate the YTD from last year's November to the current December, not the last November. My solution was to make an...
14
19074
by: Tommy Jakobsen | last post by:
Hi. Is there a method in .NET that takes "year" as an argument and returns the total number of weeks in that year? For culture da-DK (Danish). Thanks in advance. Tommy.
0
9663
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
9506
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10404
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10193
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
10136
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
9979
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
6761
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5415
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5548
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.