ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   DateTime Format (https://www.excelbanter.com/excel-programming/278703-datetime-format.html)

Joe Harriman

DateTime Format
 
I need to know the available formats for date and time.
I am interested in the Data ss:Type='DateTime'. This
type show my dates in the YYYY-MM-DDTHH:MM:SS.000 format.
Is there anyone who can tell me what to use to show my
dates as MM/DD/YYYY HH:MM AM ????
I can bring up the Command and Options window and change
it in Excel, but I want to show it this way when I create
it.

Thanks for any help.

keepITcool

DateTime Format
 

defaults are set thru control panel/regional settings.

to be indepent of user settings
you'll have to format your date yourself

? format(now,"mm/dd/yy hh:mm AM/PM")

more info: VBA help on:
User-Defined Date/Time Formats (Format Function)



keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


"Joe Harriman" wrote:

I need to know the available formats for date and time.
I am interested in the Data ss:Type='DateTime'. This
type show my dates in the YYYY-MM-DDTHH:MM:SS.000 format.
Is there anyone who can tell me what to use to show my
dates as MM/DD/YYYY HH:MM AM ????
I can bring up the Command and Options window and change
it in Excel, but I want to show it this way when I create
it.

Thanks for any help.




All times are GMT +1. The time now is 08:52 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com