Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 199
  • Last Modified:

Compare datetime between two region

I get the datetime from SQL Server from say Singapore (+8.00).

But my client PC is at BangKok (+7.00).

How should I compare the datatime properly?

0
sepknow
Asked:
sepknow
  • 3
  • 3
2 Solutions
 
dkloeckCommented:
use ToUniversalTime(), this way you can compare them based on UTC (GMT)
0
 
Jai STech ArchCommented:
conver them to UTC format and make the checking...
0
 
Jai STech ArchCommented:
0
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!

 
dkloeckCommented:
that's what I said at the first place.. you are even taking the same method.. ¬¬
0
 
Jai STech ArchCommented:
@dkloeck...if you see the time of posting between your answer and mine it is only two minutes...i have not COPIED the way you answered...I should had my browser open and before i submitted you should have submitted you answer...so i dont that it is fair to say that "YOU ARE EVEN TAKING THE SAME METHOD"...2 + 2 is always 4..no matter who says it...
0
 
dkloeckCommented:
you are right sorry for that.. :)

but 2+2 is not always 4 ..it depends on the algebra :P
0
 
sepknowAuthor Commented:
Thanks.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now