Results 1 to 8 of 8
  1. #1
    azhar2006's Avatar
    azhar2006 is offline Expert
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2012
    Posts
    528

    month February

    How to make the month of February 30 days, instead of 28 days?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    Why? Where would this be useful? February has 28 or 29 days, never 30 or 31. Other months are either 30 or 31. Do you want the 31 day months to be 30 days?
    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
    azhar2006's Avatar
    azhar2006 is offline Expert
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2012
    Posts
    528
    Thanks very much June7


    What I want is that every months the year is 30 days.
    I to in order to calculate wage salaries, and I want to make every month of the year it is 30 days.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    I think most payroll processes use the number of workdays/hours in year to calculate hourly wage.
    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
    azhar2006's Avatar
    azhar2006 is offline Expert
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2012
    Posts
    528
    Thank you June7
    But this is the organization I work request.
    I used something like this. But based on the history of the computer and I do not want it.
    Code:
    Expr1: Switch(Month(Date())=1,30,Month(Date())=2,30,Month(Date())=3,30,Month(Date())=4,30,Month(Date())=5,30,Month(Date())=6,30,Month(Date())=7,30,Month(Date())=8,30,Month(Date())=9,30,Month(Date())=10,30,Month(Date())=11,30,Month(Date())=12,30)

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    Since every month is 30 don't need the expression, just use the number 30 in your calcs. If you want a field in query to show the number 30, simply:

    Expr1: 30
    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.

  7. #7
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    you cant. it can never be done.
    you can put it in a string, but not a date field.

  8. #8
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    If you have a field in a table named, "SomeDate", you could create an alias in a Query. Include your table in a new Query. The following syntax (used in a new field as an alias) would cause each month to be followed by "30". Understand that this is not a number or a date; it is text. So, the result does not serve a purpose other than being an illustration.
    Code:
    MyMonth: Month([SomeDate]) & ", 30"

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

Similar Threads

  1. Replies: 1
    Last Post: 02-18-2015, 08:28 AM
  2. Replies: 3
    Last Post: 12-29-2014, 10:14 AM
  3. Replies: 5
    Last Post: 10-08-2014, 02:23 PM
  4. Replies: 43
    Last Post: 08-06-2014, 08:21 PM
  5. Replies: 6
    Last Post: 05-05-2014, 10:51 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
  •  
Other Forums: Microsoft Office Forums