Results 1 to 5 of 5
  1. #1
    data808 is offline Noob
    Windows 10 Access 2013 32bit
    Join Date
    Aug 2012
    Posts
    727

    Format text box with long date

    I am trying to format a bound text box with the long date format in the property sheet. I also set the default value to "Date ()" so that it auto populates with today's date. I like the long date format except for the day of the week that is included with this format. Right now its showing as:

    Tuesday, December 27, 2022

    but I would like it to be shortened to:

    December 27, 2022

    Thanks.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,913
    Try mmmm dd", "yyyy

    However, users might encounter frustration when trying to edit this field. I would format on report but not on form.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    data808 is offline Noob
    Windows 10 Access 2013 32bit
    Join Date
    Aug 2012
    Posts
    727
    Quote Originally Posted by June7 View Post
    Try mmmm dd", "yyyy

    However, users might encounter frustration when trying to edit this field. I would format on report but not on form.
    Is there a way to do this in the property sheet under the default value? Or do I need to use VBA? Right now default value for this text box is:

    Date ()

    Would I be able to add something like this:

    Date () mmmm dd", "yyyy

    I actually tried it but it didn't work. Do I have to enclose it with quotations?

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,913
    Sorry, that is typed into Format property, NOT DefaultValue.

    No quotation marks.

    Works for me.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    data808 is offline Noob
    Windows 10 Access 2013 32bit
    Join Date
    Aug 2012
    Posts
    727
    Quote Originally Posted by June7 View Post
    Sorry, that is typed into Format property, NOT DefaultValue.

    No quotation marks.

    Works for me.

    Awesome! Thanks very much June7. Worked like a charm.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 12-30-2016, 10:27 AM
  2. field format change date to text
    By Jen0dorf in forum Access
    Replies: 1
    Last Post: 09-02-2016, 12:57 PM
  3. If date field in text format
    By adnancanada in forum SQL Server
    Replies: 3
    Last Post: 08-02-2016, 01:44 PM
  4. Long date format not showing day
    By Ruegen in forum Reports
    Replies: 1
    Last Post: 10-08-2015, 11:57 PM
  5. format text string as date
    By rbrem in forum Access
    Replies: 2
    Last Post: 08-28-2012, 08:39 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums