Results 1 to 4 of 4

How to not have negative date

  1. #1
    jmuirman1 is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Aug 2016
    Posts
    53

    How to not have negative date

    when i enter 01/01/46 in a DOB date field with input mask of: 99/99/00;0;_, it defaults to 01/01/2046



    How do i revise to function properly?

    Thanks,

    John

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    7,718
    force a 4 digit year
    99/99/9999

    i'd remove the mask. The date may interpret correctly. I never use it.

  3. #3
    jmuirman1 is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Aug 2016
    Posts
    53
    I would, but i like not having to enter the full year. Any other solutions?

    Just noticed that dates before 1950 default to 20xx and dates from 1950 forward are displayed appropriately.

    Thanks,

    John

  4. #4
    Ajax is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    7,554
    Just noticed that dates before 1950 default to 20xx and dates from 1950 forward are displayed appropriately.
    that is the default basis

    guess you could use the dateadd function - something like

    dateadd("yyyy",year(mydate)<2050,mydate())

    but not sure what you want to happen if mydate = 2010

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

Similar Threads

  1. Set Registry Value Negative Number
    By RMittelman in forum Programming
    Replies: 4
    Last Post: 08-26-2019, 03:50 PM
  2. Using the (000.00) for a negative number
    By keiath in forum Forms
    Replies: 4
    Last Post: 01-10-2015, 04:43 PM
  3. Yes or No based on Positive/Negative
    By kenkencoco in forum Programming
    Replies: 1
    Last Post: 07-17-2013, 04:38 PM
  4. Positive to Negative
    By greek-autumn in forum Queries
    Replies: 3
    Last Post: 03-24-2013, 05:20 PM
  5. need help with formatting negative numbers
    By orientalmed in forum Access
    Replies: 3
    Last Post: 03-06-2013, 01:24 PM

Posting Permissions

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