15,912,329 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Nejimon CR (Top 11 by date)
Nejimon CR
31-Jan-11 1:09am
View
Thank you, SAKryukov.
I was wondering if there is a system, like IMEI for mobile devices, that uniquely identifies motherboards.
Nejimon CR
28-Jan-11 9:01am
View
Deleted
Thanks for the comment
Nejimon CR
28-Jan-11 9:01am
View
Deleted
Thank you..
Nejimon CR
28-Jan-11 9:01am
View
Deleted
Thank you
Nejimon CR
28-Jan-11 9:00am
View
Deleted
Thank you, Mr. Jinky
Nejimon CR
24-Jan-11 13:04pm
View
After a bit of researching, I have found out that there is something built into .net already. They are:
'to send data to web service timezone independently
YourDateVariable=Date.SpecifyKind(YourDateVariable, DateTimeKind.Unspecified)
'to send data from web service timezone independently
YourDatatable.Columns("YourFieldName").DateTimeMode = DataSetDateTime.Unspecified
Nejimon CR
24-Jan-11 12:09pm
View
Thank you, Richard, for sharing your ideas with me...
Nejimon CR
24-Jan-11 12:07pm
View
Yeah, I can do that for whatever DateTime parameters I send to the web service, but no way to do the same on a data table returned from the server. Currently I use the following code, where two DateTimePickers are used to specify the From/To dates:
Dim DateFrom As Date = dtpDateFrom.Value.Date 'to strip the time value and make it from 12:00 AM
Dim DateTo As Date = dtpDateTo.Value.Date.Add(New TimeSpan(23, 59, 59)) 'until just before midnight of to-date.
Dim Diff1 As TimeSpan = DateFrom.Subtract(DateFrom.ToUniversalTime)
DateFrom = DateFrom.ToUniversalTime.Add(Diff1)
Dim Diff2 As TimeSpan = DateTo.Subtract(DateTo.ToUniversalTime)
DateTo = DateTo.ToUniversalTime.Add(Diff2)
'now call the web method. this way, exactly the same time that is sent will be reflected on the server (even if the clients are from different timezones):
Dim Dt as DataTable=Svc.GetDataFromServer(DateFrom, DateTo)
Similarly, I convert the time in returned Datatable to UTC and subtract the difference between Server time and UTC from the time in Datatable.
This works fine for all practical purposes, but the whole idea of my question was if there is something simpler built into .net itself to avoid this overhead
Nejimon CR
24-Jan-11 11:21am
View
The main thing I need to know is this: Is there any way to send/receive DateTime fields to and from web service without them being converted at the other end (whatever sent is reflected at the other end too, more or less like a string)?
Nejimon CR
24-Jan-11 11:11am
View
My database is MS Access. The original data contains two date fields. The client applications (desktop applications) request data between two dates (say 01/10/2011 and 01/20/2011). At server, a web method retrieves the qualified records and sends them to the client in a data table. Suppose one of the rows in the data table originally contains a date 01/11/2011 7:30 AM, which is retrieved from database. The original data in database contains no timezone information. When this data reaches the client, ideally it should reflect the same time, right because the database contains that value and no reason to convert to any other timezone. But when this field reaches the client, the client sees the time as 01/11/2011 6:00 PM (because my server-client time difference is 10:30 hours). The end user thinks that the original data was 6:00 PM whereas the original data in the database is only 7:30 AM.
Nejimon CR
24-Jan-11 10:35am
View
Hi Richard,
It makes sense if we are building a project from scratch. I have a database where more than 100,000 records already and it is growing. The database is accessed by applications locally on the server via network as well as people from outside via web service. It is not practical to write them to database again.
Furthermore, even if you store them in database as UTC, when a particular record is retrieved and sent to the client in a DataTable, the date will get converted by 10:30 hours at the client (which is apparently wrong).
Show More