When you set the format property for a Date/Time field in a table to a Long Date, switch to Datasheet view, then click inside the Date/Time field, the format does not disappear anymore as in older versions of Access. You cannot edit the date since you do not see the original data.
Here is what I have: Date value: 11/26/2012
Long Date format: Monday, November 26, 2012
Field receive focus: Monday, November 26, 2012
When you are in Datasheet view, select the field (click inside), the format remains. In Access 2003 (under Win XP), the format disappears and the value 11/26/2012 is displayed. I have just verified this today. For text and number fields, the format goes away when the field receive focus.
When you add a time component other than midnight(00:00) than it works as expected:
Date value: 11/26/2012 01:00
Long Date format: Monday, November 26, 2012
Field receive focus: 11/26/2012 01:00
It seems that this is a bug of some sort, unless I am missing something here. May be it has to do with the Date Picker control (I turned it on and off, no change in behavior).
Access 2010 runs under Win 7, Access 2003 runs under Win XP.
Could anyone confirm this behavior and/or provide more guidance on how to handle this?
Thanks,
Related
I have a Google Sheet as the source data for a table in Google Data Studio. My table includes fields for "Sign Up Date" and "Cancellation Date".
I want to be able to filter so that I can choose a date range for "Sign Up Date" and a different date range for "Cancellation Date". For example, show me all records where the "Sign Up Date" is between Jan 1 to Jan 31, 2021, and where "Cancellation Date" is between Aug 1 to Aug 31, 2021.
As far as I can see you can only choose one Data Range Dimension per table, and any date filter you add is tied to that date field.
Is there any way I can have separate date filters for each of my date fields?
Two Range Slider Community Visualisations could be used (one for each of the date fields, Sign Up Date and Cancellation Date).
1) Accessing the Range Slider:
Click the Community Visualisations and components icon on the toolbar:
Select +Explore more to view all:
Choose the Range Slider chart from the displayed Community Gallery:
Click "Allow" to grant access to the respective Community Visualisation:
2) Using the Range Slider:
2.1) Sign Up Date Range Slider
Create both Range Sliders below and adjust the date range as required, in this case 01 Jan 2021 to 31 Jan 2021 for Sign Up Date and 01 Aug 2021 to 31 Aug 2021 for Cancellation Date:
Column to filter on: Sign Up Date
Cross-filtering: Select (☑) (this option makes sure the Range Slider also affects other charts)
2.2) Cancellation Date Range Slider
Column to filter on: Cancellation Date
Cross-filtering: Select (☑) (this option makes sure the Range Slider also affects other charts)
Editable Google Data Studio Report (Embedded Google Sheets Data Source) and a GIF to elaborate:
It looks like there is not.
What you can do it make different versions of advanced filters and use the "Between" function to compare numeric values. So you have to convert dates to some kind of numeric value first. Here is an example for this:
Data Studio Date Range Filter on hour, minute level
I have two variable prompts containing dates (2013 / 01, 2013 / 02, etc...)
Prompt_Range1
Prompt_Range2
Prompt_Range1 goes back for historical data (1990's), up to the current date. Default is the current date (2014 / 07).
Prompt_Range2 goes from Prompt_Range1 up to the current date. Default is again the current date.
This is working on the initial page load, but I want to be able to change Prompt_Range1 to some past date and have Prompt_Range2 automatically update to include all dates between Prompt_Range1 and the current date after the page has loaded.
That is to say if I select 2012 / 05 for Prompt_Range1, then Prompt_Range2 will update to include the date ranges from 2012 / 05 to 2014 / 07. If I change Prompt_Range1 again, the dates in Prompt_Range2 should update accordingly. I don't want to click any buttons or otherwise complicate the issue for end users.
Is it possible to have dynamic prompt values like this?
Thanks.
*Edit - This is the SQL I am using to populate the end date.
SELECT "Date"."Month"
FROM "MySubjectArea"
WHERE "Date"."Month" BETWEEN '#{Prompt_Range1}' AND VALUEOF(CURRENT_MONTH)
ORDER BY 1 DESC
**Edit - Did not find a solution, went back to using prefilled dates. Not ideal but working and simple.
Yes. You'll need to use an SQL expression in the available values to return dates based on the first variable.
EDIT:
Ah yes - have you tried ticking the box that says the prompt should be based on the value of all prompts?
Recently i was working with unit testing for my project.
I've given a task to test the method. The method should return the recent quarter date as per the current system date.
So, I've called the current system date using the following c# code:
string currentYear = DateTime.Now.ToString();
When i run the query it worked as expected.
So, its time for my tactics to raise a bug for that method. Hence I've changed the system date to 10/01/14 (dd/mm/yy).
Also I've customized current system date format to only keep last two digits of the year.
Ex: if year is 2014 the it shows only 14.
You can observe the short date and the long date in the following image.
When i run/debug the test in Visual Studio 2012, it still displays as 2014 as the current system date though I've modified it to 14.
Question: The real question is how did the system/program took the current year as 2014 even the system date is changed to 14. It may be silly but my doubt is Why it is not 1914 or 1814 and why it is 2014 ?.
Where did it store the current date or year information ? Does windows manage this stuff or did the C# taken care of the date ?
The real question is how did the system/program took the current year as 2014 even the system date is changed to 14. It may be silly but my doubt is Why it is not 1904 or 1804 and why it is 2014 ?.
C# only retrieved the date from the system, it was Windows that determined what data to send.
In the case of two-digit dates, Windows allows you to define what they mean in the Regional and Language applet in the Control Panel. This way you can specify the range you want it to represent depending on your usage.
The display of a date is not how it is stored, just how it is displayed.
January, 1st, 2014 may have a multitude of different formats, e.g.
2014-01-01
01-01-2014
01-01-14
1/1/14
Jan/1/14
001-2014
But all are held internally exactly the same way.
Note the advanced settings on your screenshot - this will indicate to many windows programs how to interpret a year entered as 2 digits, so it knows if it should regard a date entered as XX as 19XX or 20XX - this will cover manually entered dates, not the system date
Your C# application didn't store that date, Windows handled it for you.
As Sean mentioned, by changing from YYYY to YY you only changed how the date is displayed, not how it is stored. Windows doesn't store its system time information into a specific date format. Instead, it records the number of 100-milisecond intervals since 00:00 January 1st, 1601. That way it keeps the tracking of time independent of how it's displayed and allows you to display the date and time in a number of different formats.
As a curiosity, that specific date was chosen because the Gregorian calendar operates on a 400-year cycle (when it starts to repeat itself) and 1601 was the first year of the cycle that was active when Windows NT was being developed.
On a side note, Unix systems store that information as Unix Time or POSIX Time, counting the number of seconds elapsed since 00:00 January 1st 1970.
I have a variable input in my Userform for the start of the Financial Year. I want to be able to validate the entry, so that it will prompt the user if the date entered is not the a start date for a financial year.
Eg.The start of my Financial year is 01 Jul 2012, so if I was running a report for the month's Jul 2012-Jun 2013 the Financial is entered will not come back with an error message. But if the monthly report I'm running is "Jul 2013", or "Aug 2013", and my YTD entered is "Jul 2012", I want an alert to say "Do you want to reset your YTD entered?"
Thanks.
There is a lot you aren't explaining... your first example is a 12-month report, then later you mention monthly reports. Using your example, if the monthly report is running starts Aug 2013. Is the user input that raises the prompt ALWAYS wrong, or only sometimes?
Regardless, things like the first day of the year don't change. Why not simply hardcode the first day of the last & next 20 (?) fiscal years, and verify the user's input matches one of them. I would actually suggest in-cell Data Validation (validating against a List comprised of the first days) but you stated you were using a UserForm.
I'm in the process of migrating our Data Warehouse from Oracle to SQL Server 2012.
One piece of code I use a hundred times a day in Oracle is changing the date format for a query by using something like:
To_Char(entry_date,'WMMYY') = 30612
The above allows me to grab the date (default format = DD-MON-YY eg 01-JAN-12) and change the format for the week specified (the third week of June in the above example) by simply listing the week desired.
In my mind the above is very simple and easy to use. I can change it to whatever format I want (MMYY, MMYYYY) etc. without any issues. So far I cannot figure out an easy way to do this in SQL Server 2012 and it's really starting to bother me. It's datetime2 in SQL Server.
I'm finding stuff for CAST(), CONVERT(), DATEPART() but from what I've seen there is all kinds of wacky coding and number codes (like 101, 102, I don't understand why this is) required which just seems extraneous and over complicated to me.
Have I just not found what I'm looking for yet or is this just the way it is with SQL Server? I just want to be able to do something simple like grab all the data that was entered in during the month of june or the second week of october without having to add 200 extra characters of code.
It's a switch. You are using SQL Server 2012, so look into FORMAT() function. http://technet.microsoft.com/en-us/library/hh213505%28SQL.110%29.aspx I'm not, so unfortunately I can't test anything out for you - but there are some date formatting improvements.
For those of us who aren't - , there are things you can do that will be great - once you get used to them. This isn't specific to SQL Server - but Week of Month varies from organization to organization - so you'd have to define that to get a good example for 3rd week of month, etc. Also, when using DATEPART with week or day arguments, what gets returned is determined by the setting for the first day of the week (1 -7 - ##DATEFIRST). The numeric styles for CONVERT (again check out FORMAT() if you're on 2012) are definitely not as intuitive - but you'll probably be using the same styles over and over, and you'll have them memorized quickly. If you are set on 'WMMYY' or just use something over and over that doesn't have a satisfactory built in solution- create a UDF.
data that was entered in during the month of june
DATEPART(mm,#date) = 6
current month
month(getDate())
Or this week
DATEPART(ww,GetDate())