Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA Date Format
Hi MVPs
I have 2 date cells formatted as dd mmm yyyy hh:mm:ss in Excel 2003 one is budget date in D3 and the other revise budget date in D4. I have a macro that reads: Option Explicit Sub Chkdate() Dim dBD as date Dim dRBD as date dBD = range("D3").value dRBD = range("D4").value If dBD < dRBD then ' problem comparison by vba includes the time as well instead of do xyz ' dd mmm yyyy only. endif What i would like to do is IF format(dBD,dd/mmm/yyyy) < format(dRBD,dd/mmm/yyyy) then do xyz I am not a fundi (expert) in vba Thks and Rgds KZ |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
permanent conversion of 1904 date format to 1900 date format | Excel Worksheet Functions | |||
convert serial date format to normal date format | Excel Discussion (Misc queries) | |||
Excel 2000 date format cannot be set to Australian date format | Excel Discussion (Misc queries) | |||
code to convert date from TEXT format (03-02) to DATE format (200203) | Excel Programming | |||
Change a date in text format xx.xx.20xx to a recognised date format | Excel Programming |