Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Y2K conversions using mainframe dates

Posted on 1998-08-18
3
166 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

839 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