473,386 Members | 1,706 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Working with Dates

115 100+
@ NeoPa
I just have a question if we saved the Date as mm/dd/yyyy how can we change it then to this format (dd/mm/yyyy)?
Or we should change the format before inserting the date in the database? Thanks for advanced
Aug 12 '10 #1
1 1613
NeoPa
32,556 Expert Mod 16PB
This question relates to the article (Literal DateTimes and Their Delimiters (#)).

The question you ask makes no sense. This sounds harsh, but I want to explain why. Then you will understand the whole subject more clearly.

The clue is in the title :
Literal DateTimes and Their Delimiters (#)

There is a big difference between a date stored inside the computer (as a Date/Time) and a string which may represent a date. It's hard to distinguish sometimes, as to see and understand a date value on the screen it must first be converted to a string. Hence the Format property of numeric and date fields. However, there is a fundamental difference between a date value that happens to be displayed on the screen in "m/d/yyyy" format, and a string literal that shows the same characters.

A date is never stored as "m/d/yyyy" or "d/m/yyyy". That wouldn't make sense as date fields are numeric and cannot contain string values. Dates are all stored the same way inside your field. Regardless of what default or explicit format properties you may employ.

Does this understanding help you to grasp the issue? If so, you will understand why I can't answer your question directly.
Aug 12 '10 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Richard Hollenbeck | last post by:
I'm trying to write some code that will convert any of the most popular standard date formats twice in to something like "dd Mmm yyyy" (i.e. 08 Jan 1908) and compare the first with the second and...
11
by: Peter Pfeiffer | last post by:
I've written several scripts that have "while" blocks which increment a date by one day if the date does not match one of a group of dates. However, sometimes it apparently steps out out the while...
3
by: | last post by:
Hello, I am hoping someone else has thought about a date time calculation i need to perform. I would like to be able to calculate the number of "working minutes" between 2 dates, given my...
15
by: @sh | last post by:
For some reason guys my SQL string isn't working and I'm probably doing something stupid? SELECT * FROM sol_session SELECT * FROM SOL_Session WHERE DateGiven...
1
by: BerkshireGuy | last post by:
I have a Access database that should have data for each weekday of the year. There is a field called DateDownloaded, which should have at least one record for each weekday of the current year. ...
1
by: Jesse | last post by:
Hi, I am working on datetimepicker and want make the dates out of my range disabled. There are APIs that I have used: minDate, maxDate. It works fine. However, users can not tell which date can't...
12
by: jonathan184 | last post by:
Hi the purpose of the script I am trying to do is to access a dir and run the ls -l command which will show the files and the modified date, no w the script is to check two files in that dir , if the...
11
by: lenygold via DBMonster.com | last post by:
Hi everybody! This query is supposed to count consecutive years from the current year without OLAP. Input Table: ID DateCol 1 02/01/2006 1 01/01/2006 1 01/01/2005
2
by: angi35 | last post by:
Hi, I'm working in Access 2000. I have a form with a series of date fields, showing the progress of a project from start to completion. There's a set of fields/controls for projected dates (when...
0
Jerry Maiapu
by: Jerry Maiapu | last post by:
I HAVE THIS Sql Query ( qrysummary) : SELECT .Salutation, ., ., IIf((WorkingDays(!!, !!))-()<0,0, (WorkingDays(!!,!!))-()) AS , IIf(IsNull(),0,) AS , .SumOfHrtMintNoAOT,
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.