SOLVED

VBA Date & Time issue

Copper Contributor

D_Jones1994_0-1625136012619.png

 so the above VB Code above says that if cells A, B and C are completed, then in Cell D the date and Time is added in the format "DD/MM/YYYY hh:mm:ss AM/PM"

but for the first 12 days of the month the format is "MM/DD/YYYY" but once it turns the 13th, it corrects itself as if it finally registers as a month?

D_Jones1994_1-1625136182734.png

 

so for example.  tomorrow it'll say 07/02/2021.  but on the 13th it'll say 13/07/2021.

 

Thanks in advance for any help with this.  it's been bugging me for months :p

 

D_Jones1994

 

2 Replies
best response confirmed by allyreckerman (Microsoft)
Solution

@D_Jones1994 

 

Use

    Cells(x, 4).Value = Now
wow... yeah that's worked. thank you so so much.

(I'm a little embarrassed how easy that solution was)

Thank you
1 best response

Accepted Solutions
best response confirmed by allyreckerman (Microsoft)
Solution

@D_Jones1994 

 

Use

    Cells(x, 4).Value = Now

View solution in original post