Solved

different time formats...

Posted on 1998-12-01
4
151 Views
Last Modified: 2010-05-03
There is some programs which expresses time in seconds counted somewhere from early 80´s.
Is this kind of way to express time familiar to someone and is there any function in VB5 so that those seconds can be transformed to normal date??

Thanks in advance!
0
Comment
Question by:majala
[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
  • 2
4 Comments
 
LVL 18

Accepted Solution

by:
deighton earned 50 total points
ID: 1447596
Yes ther is!

DateAdd("s", lSeconds, "01-01-1980")

this adds the number of seconds hel in the long variable lSeconds to "1st Jan 1980" to give the date and time.
0
 

Author Comment

by:majala
ID: 1447597
How this could be done to other direction? If I have a "normal" date (e.x. 13.11.1998) and I wanna know how many seconds it is from 1.1.1980.
0
 

Author Comment

by:majala
ID: 1447598
How this could be done to other direction? If I have a "normal" date (e.x. 13.11.1998) and I wanna know how many seconds it is from 1.1.1980.
0
 
LVL 1

Expert Comment

by:lawnranger
ID: 1447599
Dim SD As Date
Dim ED As Date
Dim Seconds As Long
SD = "1/1/1980"
ED = "11/13/1998"
Seconds = DateDiff("s", SD, ED)

This will return the number of seconds between 0000 11/1/1980 and 0000 11/13/1980. You can also specify the time for either or both as in;

SD = "15:30 1/1/1980"
ED = Now

Hope this helps...
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Computer crashes, following error message in event manager 5 276
Hide vba in gp 7 114
vbModal 12 66
VB script to continue despite error 2 48
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
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 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…

735 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