Jump to content
  • 0

how can I found the last date in a table?


wvantongeren

Question

2 answers to this question

Recommended Posts

  • 0

Hi @wvantongeren,

You can use SQL Functions into your Calculated Field: MAX for the last day and MIN for the first day.  For more information about MIN() and MAX() functions, click here.

Sample Formula is here: 

Latest Date
CONVERT(VARCHAR(10),(SELECT MAX(Column_Name) FROM Table_name WHERE Column_Name =target.[@Field_name]),101)

Earliest Date
CONVERT(VARCHAR(10),(SELECT MIN(Column_Name) FROM Table_name WHERE Column_Name =target.[@Field_name]),101)

I hope this helps!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...