Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Y2K conversions using mainframe dates

Posted on 1998-08-18
3
Medium Priority
?
172 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
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 utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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

636 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