DateTime into equivalent long value

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

We are facing problem in converting the DateTime into equivalent long value in .NET, we need to pass this long value back to Java server. is this possible? if yes please send us some suggestion on the same.
 
San said:
We are facing problem in converting the DateTime into equivalent long
value in .NET, we need to pass this long value back to Java server.
is this possible? if yes please send us some suggestion on the same.

Well, there's DateTime.Ticks - but that won't get you back the
equivalent java.util.Date if you pass it into the Date constructor.

To be honest, the best way of transferring a date in a portable fashion
is as a string in a well-defined format (such as ISO8601). If you don't
care about the timezone information being preserved, you may find it
easiest to convert to UTC first.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top