When I use Oracle date functions Format, the date format is - DD-MM-YYYY, on other machines, when I use the same function, I get this date format MM-DD-YY, this is really confusing how can I change it so both machines use the same date format?
- If you need clarification, ask it in the comment box above.
- Better answers use proper spelling and grammar.
- Provide details, support with references or personal experience.
Tell us some more! Your answer needs to include more details to help people.You can't post answers that contain an email address.Please enter a valid email address.The email address entered is already associated to an account.Login to postPlease use English characters only.
Tip: The max point reward for answering a question is 15.
Hi, i am using windows 7 and clicked on start, control panel, regional and language, and then found my settings (was having same problem with quickbooks premier and the date set to US) and found i had accidently selected in the install of windows 7 [English-USA] instead of [English-Australia]. i altered two settings and now my quickbooks is working fine. whenever i searched for this on quicken help sites it did not indicate clearly how easy it was to fix this.
Your date form is what it wrong. In order to use dates in Access with a BETWEEN function clause the values have to specifically be dates.
You can create dates in literal strings using the # sign to bound them, as in:
Select DISTINCT [ActivityDate] between #1/1/08# and #12/31/08#
#....# tells Access to treat this literal string as a date.
If you are using non-literal values, such as a parameter handed into the query, which would then be a variable, you can't use #some_variable# to cause Access to view it as a Date since #...# is for literal values only. To convert (also called "casting" a variable), use the CDate function. CDate likes to know what format to expect the string to come in though so it helps to pass that along, as in:
Select DISTINCT [ActivityDate] between CDate(begin_dt_string) and CDate(end_dt_string)
Remember the date string you pass into CDate has to be readable as a date by CDate. So make sure you pass in something that it can handle (use the IsDate() function to check to be sure so you can avoid a runtime datatype casting error). If your locale is US, then passing in x/y/z it will take for MM/DD/YYYY. If Europe, it will take it as DD/MM/YYYY. So keep that in mind.
To convert out of a date, use the FORMAT() function. That is how you get a date data type value to become a string value.
More fun reading: http://www.techonthenet.com/access/functions/datatype/cdate.php http://www.techonthenet.com/access/functions/advanced/isdate.php http://www.techonthenet.com/access/functions/date/format.php
If it's anything like Excel, someplace in the FORMAT menu should be options to allow you to change the date format. (Block off the cells, row, or column in question, click FORMAT in your toolbar.) You may have different country options or formatting choices within the date type.
It needs to be in the format "yyyy-dd-mm hh:mm:ss:nnn". The BETWEEN keyword must include the time as well. so if you want from DTPicker date of "2007-09-01" and "2007-09-10" it will literally be this "2007-09-01 00:00:00.000" and "2007-09-10 00:00:00.000" thus not including any of the day for the 10th. If you want the 10th, then you have increase Date2 + 1 day to be "2007-09-11 00:00:00.000".
You should always remember that dates include the time.
I like to use the >= date1 and < date2. It's a little more forgiving.