Date

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Joe

    Date

    In Excel you are able to write a formula
    =DATE(YEAR(TODA Y())-1,MONTH(TODAY() ),DAY(TODAY())) which will return
    todays date 1 year ago. I'm not sure if I am explaining this right so
    bear with me. Is there a similar function in Access that I can you in
    a text box? Thanks.


  • Omey Samaroo

    #2
    Re: Date

    Did you mean something like Date()-365
    "Joe" <job2@cogeco.ca > wrote in message
    news:p5galvs5ls qu0ocpqvc0dct2m 846aa7lrb@4ax.c om...[color=blue]
    > In Excel you are able to write a formula
    > =DATE(YEAR(TODA Y())-1,MONTH(TODAY() ),DAY(TODAY())) which will return
    > todays date 1 year ago. I'm not sure if I am explaining this right so
    > bear with me. Is there a similar function in Access that I can you in
    > a text box? Thanks.
    >
    >[/color]


    Comment

    • Joe

      #3
      Re: Date

      On Wed, 03 Sep 2003 01:24:49 GMT, "Omey Samaroo"
      <nospam@replyto group.com> wrote:
      [color=blue]
      >Did you mean something like Date()-365
      >"Joe" <job2@cogeco.ca > wrote in message
      >news:p5galvs5l squ0ocpqvc0dct2 m846aa7lrb@4ax. com...[color=green]
      >> In Excel you are able to write a formula
      >> =DATE(YEAR(TODA Y())-1,MONTH(TODAY() ),DAY(TODAY())) which will return
      >> todays date 1 year ago. I'm not sure if I am explaining this right so
      >> bear with me. Is there a similar function in Access that I can you in
      >> a text box? Thanks.
      >>[/color][/color]
      Thanks, didn't realize it was so easy. The next question could be a
      bit harder. How do I make it default to Jan 1 of the current year?

      Comment

      • Fredg

        #4
        Re: Date

        =DateAdd("yyyy" ,-1,Date())

        --
        Fred

        Please reply only to this newsgroup.
        I do not reply to personal e-mail.


        "Joe" <job2@cogeco.ca > wrote in message
        news:p5galvs5ls qu0ocpqvc0dct2m 846aa7lrb@4ax.c om...[color=blue]
        > In Excel you are able to write a formula
        > =DATE(YEAR(TODA Y())-1,MONTH(TODAY() ),DAY(TODAY())) which will return
        > todays date 1 year ago. I'm not sure if I am explaining this right so
        > bear with me. Is there a similar function in Access that I can you in
        > a text box? Thanks.
        >
        >[/color]


        Comment

        • Trevor Best

          #5
          Re: Date

          On Wed, 03 Sep 2003 02:24:06 GMT in comp.databases. ms-access, "Tim
          Mills-Groninger" <timmg@earthlin k.net> wrote:
          [color=blue]
          >dateserial(yea r(date())-1,month(date()) ,day(date()))
          >
          >Microsoft is a bit like the former Soviet Union when it comes to consistancy
          >between applications. Excel's Today function maps to Access's Date(),
          >Excel's date becomes Access's DateSerial. And don't even get me started on
          >string functions. sigh.[/color]

          How about string theory then? Access supports eleven dimentional
          arrays <g>

          --
          A)bort, R)etry, I)nfluence with large hammer.

          (replace sithlord with trevor for email)

          Comment

          • Trevor Best

            #6
            Re: Date

            On Wed, 03 Sep 2003 18:51:24 +0100 in comp.databases. ms-access, Trevor
            Best <bouncer@localh ost> wrote:
            [color=blue]
            >or use DateDiff()[/color]

            or even DateAdd().. d'oh! :-)

            --
            A)bort, R)etry, I)nfluence with large hammer.

            (replace sithlord with trevor for email)

            Comment

            Working...