Sorry for the odd title, not sure how else to summarize the issue.
I'm working with Report Designer 1.0 in SSRS 2005.
I have month names (e.g. January, February, etc) that I have extracted from a longer string that I am using in a 'Month' column of a table using this in the Edit Expression box:
=Mid(Fields!DESCRIPTION.Value, InStrRev(Fields!DESCRIPTION.Value, " ") + 1)
I now need to put the months in chronological order. Can anyone help?
Many thanks,
Jens
Related
I followed advice on how to filter CDS records based on dates. I thought it was working last week, but now it's showing past dates. I am using powerapps and datasource is cds and I placing this into a gallery.
The formula which have been entered into the items field:
Sort(FirstN(Filter('Course schedule',End <= DateAdd(Today(), 70)),2),End)
Right now it's showing a record where End = 26/11. A past date. Plus a date in January 2022. However I have several dates between today and January. The expected view would be to see the 2 upcoming records that are closest to today's date. And not past dates...
In this picture we see the End-field showing 26th of november and January 21st.
The first is to understand why it's showing a past date and how to remedy it.
The second, what to add to sort it by end-date.
For clarification, 'Course schedule' is the table/entity I am referring to, End is the column/field inside of it that's chosen to filter from. It's a date type field.
Many thanks!
Ok, I think I have figured it out just by trying. Not sure why though:
Sort(
Filter(
'Course schedule',
End >= DateAdd(
Today(),
1
)
),
End,
Ascending
),
2
)```
Have a Google Sheet that I'm trying to build. It uses IFTTT to pull articles people read into a individual, and then an aggregate spreadsheet.
In terms of specs, it needs to:
Pull in data from multiple sheets.
The first column in each source sheet is a date column. Some are formulas (to remove extraneous data from another date column), and some are hard-coded. This may differ sheet to sheet, but is constant per sheet.
Once imported into the aggregate sheet, I need to sort by date.
Problem
I'm a query/importrange newbie, and I'm currently stuck on the sorting by date.
Current URL
https://docs.google.com/spreadsheets/d/1GLGYvApJgRheg7rgzoB8rFyTUgkRpZ2O8eKVE4bZyo4/edit?usp=sharing
When I order by Col1, I can't honestly tell how it is sorting, the end result is:
March 7, 2017
February 15, 2007
February 28, 2017
March 7, 2017
March 8, 2017
November 9, 2010
If you inspect the cells, the first March 7, 2017 is situated where the formula resides, which does not seem to move no matter how I sort. If you look at the sort order without that cell, it seems to be sorting alphabetically.
So it comes down to two main questions:
-What am I doing wrong that is making it so the order by is not including the first row.
Edit: This is now fixed
-How do I get it to recognize that the contents of the sorting column is a date?
Thanks ahead of time -
J.
Your formula seems to have a few problems.
importrange should take key not url. But it seems that it works anyway...
Pulled sheets have no header, so the 3rd parameter of query should be -1 or omitted, not 1.
If Col1 is a valid date, <> '' should not work. It should be is not null.
But it turns out that your pulled sheets' dates are not yyyy-mm-dd format so they weren't recognized as dates by query.
Thus, more valid formula should be like this:
=query({importrange("...", "Sheet1!A:E");importrange("...", "Sheet1!A:E")},
"select * where Col1 is not null order by Col1 asc",
-1)
And you should format dates(column A) on your pulled sheets to yyyy-mm-dd. Check my working sample aggregator and pulled sheet one and two.
Good morning,
I'm currently working on a custom date for a label. It needs to read the last 2 numbers of the current year, followed by the number of day it is within the current year (8/3/2016 would be day 216). So if I were to print a label, the date on 8/3/2016 should read 16216. The following is the current code in the formula:
toText(CurrentDate,"yy") & DateDiff ("d", #1/1#, today) + 1
For reasons I'm unfamiliar with, this returns 16216.00. My question is how do I get rid of the decimal places with this being a text field?
If taken by themselves, toText(CurrentDate,"yy" returns 16 and DateDiff ("d", #1/1#, today) + 1 does return 216. It's only when concatenated that the decimal places appear. Is there a better way to do this?
I'm fairly new to using Crystal, so any help would be appreciated.
Thanks, guys.
You are looking for the Julian date. You have a couple of options
SELECT DATEPART(yy, #date), DATEPART(dy, #date)
SELECT RIGHT(CAST(DATEPART(yy, #date) AS char(4)),2)
The link below goes into much further detail
http://blogs.msmvps.com/robfarley/2009/03/25/converting-to-and-from-julian-format-in-t-sql/
I'm writing a report that has proposal information by estimator per month. So I created a matrix where each row is grouped by estimator and each column is grouped by the month.
The thing is, my query includes data for this year AND last year, but the columns by month should only contain this year's information. So I though simple, I'll create a filter: Year(variable_date) = Year(Today()).
When I do this, no record information shows up. But then I changed the column to group by month AND year and suddenly, it works. Only 2015 records show up in the calculations per month.
Why did I need to group it by month AND year? Why couldn't I just group by month and have the filter remove records that didn't have the correct year using the filter group property tab?
Thanks!
P.S. I hope I have the tags right...
It sounds like month and year are separate fields. So when you group only by month it is grouping all of the rows where the value for that field is the same. (Month=8 exists in 2014 and 2015.) The values are just numbers to SSRS and it doesn't know it needs to look at the year field too unless you tell it to.
I ran an SQL Query for Oracle which consists of Invoice date and Check date. When these data are copied on to an Excel Spreadsheet as text, it's dispayed as ex: "13-10-31" (Oct 31, 2013). However, when converted to date format, it's displayed as "10/13/1931". I've tried different date types but it always recognizes as the first part of the text as the day, then month, then year. I need these values to be setup as a date format as I need to calculate Days Payable Outstanding and other related ratios.
Is there any way to convert these values so that Excel recognizes the day, month, and year correctly? Would there be a macro that could automate this process for existing data and data that will be added in the future?
Thank you in advance.
Firstly, I hope the data type of your date column is DATE.
Secondly, the date should always have year as YYYY and not just YY. The world has already learned from Y2K bug.
If above two points are met, then while displaying use to_char(date_column, 'mm/dd/yyyy'). Thus, with YYYY format, there won't be any confusion between year and other fields.