Mar 14, 2012 #1 SigAdams IS-IT--Management Joined Sep 27, 2010 Messages 5 Location US For example, if I had the date 02/01/1987 Is there any way to automatically convert it to 02/01/2012? Or whatever the current year happens to be? I've tried a few things, each more clunky than the last.
For example, if I had the date 02/01/1987 Is there any way to automatically convert it to 02/01/2012? Or whatever the current year happens to be? I've tried a few things, each more clunky than the last.
Mar 14, 2012 #2 Andrzejek Programmer Joined Jan 10, 2006 Messages 8,576 Location US Do you mean, convert the date in SQL? Do it in VBA? On paper? You need to be more specific. If VBA, you may try: [tt] Dim dt As Date dt = CDate("02/01/1987") MsgBox Month(dt) & Day(dt) & Year(Date) [/tt] Code not tested. Have fun. ---- Andy Upvote 0 Downvote
Do you mean, convert the date in SQL? Do it in VBA? On paper? You need to be more specific. If VBA, you may try: [tt] Dim dt As Date dt = CDate("02/01/1987") MsgBox Month(dt) & Day(dt) & Year(Date) [/tt] Code not tested. Have fun. ---- Andy
Mar 15, 2012 #3 PHV MIS Joined Nov 8, 2002 Messages 53,708 Location FR You wanted this ? newDate=DateSerial(Year(Now()),Month(oldDate),Day(oldDate)) Hope This Helps, PH. FAQ219-2884 FAQ181-2886 Upvote 0 Downvote
You wanted this ? newDate=DateSerial(Year(Now()),Month(oldDate),Day(oldDate)) Hope This Helps, PH. FAQ219-2884 FAQ181-2886