Visual Basic & Date

  KW2K 21:22 26 Mar 04
Locked

Hi everyone,
Does anyone out their know what the code is for displaying the current date and time in Visual Basic in the folowing format: 26 Oct Thursday 2004 14:23:00. Or does anyone know if their is a Visual Basic forum which could answer this question.

Regards.

IN all cells that you require the format use
Format Cells - Custom and use the following format.

dd mmm dddd yyyy hh:mm:ss

If you specifically require it in VBA then the following code would set A1 accordingly

Range("A1").Select

Selection.NumberFormat = "dd mmm dddd yyyy hh:mm:ss"

  KW2K 00:09 27 Mar 04

Hi Whisperer,
Thanks for the code, worked a treat !

Regards.

This thread is now locked and can not be replied to.

Best phone camera 2016/2017: Galaxy S7 vs iPhone 7 vs Google Pixel vs HTC 10 Evo vs OnePlus 3T vs…

1995-2015: How technology has changed the world in 20 years

The Pantone Colour of the Year 2017 is Green

Super Mario Run preview | Hands-on first impressions of Super Mario Run: Mario's iPhone & iPad…