?
Solved

Y2K conversions using mainframe dates

Posted on 1998-08-18
3
Medium Priority
?
170 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
[X]
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
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 150 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

Introducing Priority Question

Increase expert visibility of your issues by participating in Priority Question, our latest feature for Premium and Team Account holders. Adjust the priority of your question to get emergent issues in front of subject-matter experts for help when you need it most.

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…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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…
Suggested Courses
Course of the Month15 days, 7 hours left to enroll

743 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