Solved

Y2K conversions using mainframe dates

Posted on 1998-08-18
3
163 Views
Last Modified: 2010-04-30
Looking for information on converting dates in a large project to accomodate main frame dates. Where the dates are based on the following. If year is greater than 1949 then the year is 20** else they are 19**. I realize that vb5 uses 1929 as the cut off for year 1900 (I think) when looking at 6 digit dates. What I am looking for is information on making conversions for dates. Y2K stuff for Visual basic.

Regards Steve
0
Comment
Question by:stevesm
3 Comments
 
LVL 4

Expert Comment

by:mcix
ID: 1429724
There is a question about this, sort of:

Look at

http://www.experts-exchange.com/comp/databases/access/Q.10073665
0
 

Accepted Solution

by:
bjbenoit earned 50 total points
ID: 1429725
you need to write your own "sliding window" algorithim...

function y2k(sdate as date) as string
dim iyear as string
iyear = left(sdate,1,2)
if iyear > 49 then
y2k = "20"&iyear
else
y2k = "19"&iyear
endif

.of course because I am using string this code is probably not 100% y2k compliant but it should give you a good starting point (add code to check that it is a real date, etc.)
0
 
LVL 1

Author Comment

by:stevesm
ID: 1429726
Thanks for the info, I have yet to implement the code but I'll award you the points.

Steve
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
VBA to format 3 80
Replace Formatted Numbers with text 9 51
VBA saving file message display 5 47
Determine Range to Select 5 34
There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now