LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
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. :)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Date & Time Question sot Excel Discussion (Misc queries) 7 October 30th 07 06:43 PM
Time and Date Question wx4usa Excel Discussion (Misc queries) 6 October 8th 07 03:34 AM
Another question about time and date ECLynn Excel Discussion (Misc queries) 2 August 30th 06 10:13 PM
Date/Time Question bladelock Excel Worksheet Functions 2 November 10th 05 02:42 AM
date/time question mk Excel Programming 5 June 7th 05 12:32 PM


All times are GMT +1. The time now is 02:05 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"