473,378 Members | 1,680 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

DateTime into equivalent long value

San
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.
Nov 22 '05 #1
2 1756
San <an*******@discussions.microsoft.com> wrote:
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.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 22 '05 #2
San <an*******@discussions.microsoft.com> wrote:
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.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 22 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: San | last post by:
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...
16
by: PK9 | last post by:
I have a string variable that holds the equivalent of a DateTime value. I pulled this datetime from the database and I want to strip off the time portion before displaying to the user. I am...
2
by: nic | last post by:
hey, I always struggle with the following: I have an object obj with a property paydate (type = DateTime) Now, after instantiating the object and do several things, I want too check if my...
2
by: - Steve - | last post by:
I'm taking the value of the expire date out of an AD account (accountExpires attribute) and passing it into this function. static DateTime LargeIntToDateTime(ActiveDs.LargeInteger li) { long...
3
by: Christopher Crooker | last post by:
We had a function with the signature: Function(Object *, DateTime, DateTime, EnumType) and then changed the class some and there was a 4 parameter function with the signature: ...
5
by: anony | last post by:
Hi, If I have a datetime, how do I display it as its13 digit numeric value? Thanks.
9
by: Phil B | last post by:
I am having a problem with a datetime from a web services provider The provider is sending the following SOAP response <?xml version="1.0" encoding="utf-8"?> <soap:Envelope...
1
by: A.Neves | last post by:
Hi, I'm having a problem, I have a DateTime value in Portuguese representation (dd-mm-yyyy) and I'm using SQLServer2005 with its default language English (yyyy-mm-dd), so when I assemble a WHERE...
14
by: msavazzi | last post by:
Hi, it should be simple, put FILETIME in a Long conver it in date using the DateTime.FromFileTimeUtc The help even says: Converts the specified Windows file time to an equivalent UTC time. ...
4
by: sumip | last post by:
I just made a pretty strange observation with .NET 2.0 - DateTime.AddMilliseconds(double) and AddSeconds(double) seem to be broken: DateTime now = new DateTime(); DateTime t2 =...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.