View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.misc
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default Formula for Created on Date

Changing formats won't work because the function returns a string. This
version:

Public Function creation_date() As Date
creation_date = ActiveWorkbook.BuiltinDocumentProperties("Creation Date")
End Function

returns a true date/time that you can format as date-only
--
Gary''s Student - gsnu200757


"Joe M." wrote:

This works fine except it displays in Date/Time format. I tried to change the
cell format but that doesn't do anything. Also I tried to reference from
another cell and format that cell to display as MM/DD/YYYY and other date
formats but that doesn't work either. How to I change the format?

Thanks,
Joe M.

"Gary''s Student" wrote:

Try this one-line UDF:

Public Function creation_date() As String
creation_date = ActiveWorkbook.BuiltinDocumentProperties("Creation Date")
End Function

--
Gary''s Student - gsnu200757


"Joe M." wrote:

I am trying to automatically insert the file created on date in a cell. Is
there a formula to do this?

Thanks,

Joe M.