dbWriter Home
IP to Country Look up
Site Map

IP to Country DB

Free Databases:

ASP Code

ASP Links

VB Script functions:
Array
Case/Select
In String (inStr)
Replace

HTML code:
SELECT Color
SELECT Countries
SELECT Language
SELECT State/Province

SQL:

SQL Functions:
Delete leading Char
Get Browser
Long number from IP

Stored Procedures:

SQL Tricks:
Delete ALL duplicates
Delete dup records

MISC
IP Address Owner
MS SQL Server

Mortgage Calcs:
how much is my payment
Loan Amortization
Loan Calculator
Mortgage Calculator
Motrgage Pay Off

dbWriter License

Link to US

Links

Contact US
 

  SQL time adjust from server time

Store all of your data/times as the server date/time.  Then when viewed do this time correction to give the user the correct time for their location.  This keeps all times consistent where ever they are viewed WITH the a view and HOUR change.

Date and times are stored at the server, where ever in the country/timezone it might be thus a time adjust is needed when viewed in a different time zone.  The simple solution is build a view of your table with a DATATADD applied to your stored time in the database to adjust the hour from the server time to the time zone location.

Syntax     DATEADD ( datepart , number, date )
 
Datepart Abbreviations
Year yy, yyyy
quarter qq, q
Month mm, m
dayofyear dy, y
Day dd, d
Week wk, ww
Hour hh
minute mi, n
second ss, s
millisecond ms

 
DATEADD([hour], - 1, dbo.YourDateTimeColumn) --hour adjust in a view

 

 

Partners/Links © 2005 - 2008 dbWriter.com All Rights Reserved
This site is protected by the dbWriter IPtoCountry MS/SQL database!!
Site map | Link to US
Contact Us

Sign up for PayPal and start accepting credit card payments instantly.