By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,541 Members | 1,106 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,541 IT Pros & Developers. It's quick & easy.

VB.NET to Java : Timespan ?

P: 2
I'm new to Java, and I'm converting a VB.NET program to Java and learning as I go along, I'm a bit stuck on one bit, how would I convert this VB.NET function to Java:

Expand|Select|Wrap|Line Numbers
  1. Public Function Diff(ByVal date As Julian) As TimeSpan
  2.      Const TICKS_PER_DAY As Double = 864000000000
  3.      Return New TimeSpan(CType(((m_Date - date.m_Date) * TICKS_PER_DAY), Long))
  4.    End Function
It's the TimeSpan data type that I'm stuck on, I can't seem to find an equivelant in java.

Thanks in advance...
Nov 23 '06 #1
Share this Question
Share on Google+
1 Reply

P: 2

Its a bit quiet on here, found the answer on a proper Java message board, the answer is....Use a LONG data type.
Dec 4 '06 #2

Post your reply

Sign in to post your reply or Sign up for a free account.