Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Add 5 hours to a DateTIme field

Status
Not open for further replies.

frieb

Technical User
Aug 8, 2005
13
US
I need to add 5 hours to a DATETIME field due to Greenwich Time. I need to know what the formula would be.
 
DateAdd("h", 5, {your.datetime)

It's best to give your Crystal version, but the formula should be the same for all of them.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Version 11.5........

Sorry, I need to subtract 5 hours (not add)
 
DateAdd("h", -5, {your.datetime})

Also, in CR XI, there is a function called something like "shiftdatetime" (I don't have CR right now) that does the adjustment based on Greenwich Time.

-LB
 
THANKS SO MUCH! That worked!
 
It worked but , i am calculating a 3.5 hours differenct but it seems that VBA is not calculating the decimals like 3.5 but it dose a fixed number like 3

any solutions

cheers,
 
This is really a new issue, so please start a new thread. Also explain what 'VBA' is.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top