View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
srroduin srroduin is offline
external usenet poster
 
Posts: 34
Default Date Time Question

I'm writing code that will subtract one hour from the time that the person
types in. If the person types only a date and not a time Excel defaults to
00:00 for the time portion. That's the answer I want for that case only.

How would I word an if statement to say if SASStartHE is typed as date 00:00
then SASStartHE = SASStart else SASStart = Dateadd("h", -1, SASStartHE).


Any ideas are greatly appreciated. :)