473,847 Members | 1,482 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

date/time fields

Hallo,
I know a lot has already been told about date/time fields in a database but
still confuses me, specif when dealing with SQLserver(Expre ss).
It seems that sqlserver only accepts the date in a "yyyyMMdd" format?
(difference between Express and MSDE2000A ?)
What is the one and only true way to deal with this problem in VB2005:
Local settings are Dutch (Belgium) ; thus date is in "dd/MM/yy" (or perhaps
dd/MM/yyyy) and time in "hh:mm:ss"

dim MyDateVar as string, MyIdVar as Integer
dim MyCommand = New Sqlcommand("",C onnection)
MyCommand.comma ndtext = "Update MyTable Set MyDatefield = '" & MyDateVar &
"' Where MyIdField = " & MyIdVar = SomeIntegerValu e
MyCommand.execu tenonquery

How to deal with the MyDateVar when:

1.
The Variable comes from a textbox knowing that the user puts in dd/MMyyyy
In this case there is no need to have the time with it.

2.
The date comes from a datetimepicker control
(MyDateVar = DtPicker.Value) ?

3.
The date and time comes from the system
MyDateVar= Format(DateTime .Now, "yyyyMMdd") seems to work but
Format(DateTime .Now, "yyyyMMdd.hhmms s") gives a runtime error

So, any help and/or suggestion on this will be greatly appreciated.
Thanks and greetings to all
Jerome
Jan 25 '06 #1
7 4245
Jerome,

It is very simple you should never use a date/time as a string, however
always as a DateTime field.

When you present that to a textbox, than you can use the overloaded toString
with the Iformatprovider
http://msdn.microsoft.com/library/de...classtopic.asp

If you get it back you can use the Cdate
mydateField = Cdate(mytextbox .text)

And if you want to supply it to a database you use the parameters.
http://www.vb-tips.com/default.aspx?...6-7139b8970071

Maybe even better to show with this more extended but with a Dutch datetime
in it and for Access (OleDb)
http://www.vb-tips.com/default.aspx?...3-eb8b44af0137

In fact is that all.

(The datetimepicker. value returns a datetime field).

Cor


Jan 25 '06 #2
"Jerome" <Jo*****@fake.c om> schrieb
Hallo,
I know a lot has already been told about date/time fields in a
database but still confuses me, specif when dealing with
SQLserver(Expre ss).
It seems that sqlserver only accepts the date in a "yyyyMMdd"
format? (difference between Express and MSDE2000A ?)
What is the one and only true way to deal with this problem in
VB2005: Local settings are Dutch (Belgium) ; thus date is in
"dd/MM/yy" (or perhaps dd/MM/yyyy) and time in "hh:mm:ss"

dim MyDateVar as string, MyIdVar as Integer
dim MyCommand = New Sqlcommand("",C onnection)
MyCommand.comma ndtext = "Update MyTable Set MyDatefield = '" &
MyDateVar & "' Where MyIdField = " & MyIdVar = SomeIntegerValu e
MyCommand.execu tenonquery

How to deal with the MyDateVar when:
Store date/time values *always* in variables of type DateTime.
1.
The Variable comes from a textbox knowing that the user puts in
dd/MMyyyy In this case there is no need to have the time with it.
I guess this is "dd/MM/yyyy"?

Use Date.ParseExact (or Date.Parse) to convert form string to DateTime.
2.
The date comes from a datetimepicker control
(MyDateVar = DtPicker.Value) ?
Declare MyDateVar as DateTime and everything is fine. Maybe you have to cut
off the time:

MyDateVar = DtPicker.Value. Date

3.
The date and time comes from the system
MyDateVar= Format(DateTime .Now, "yyyyMMdd") seems to work but
Format(DateTime .Now, "yyyyMMdd.hhmms s") gives a runtime error
You don't need this for an SQL.
So, any help and/or suggestion on this will be greatly appreciated.


Use parameters with MyCommand. You won't have to care about the format
anymore:

dim MyDateVar as datetime
dim MyCommand = New Sqlcommand("",C onnection)

MyDateVar = date.parse(myte xtbox.text)
- or -
MyDateVar = DtPicker.Value. Date
MyCommand.comma ndtext = "Update MyTable Set MyDatefield = @mydate Where
MyIdField = @id"

with mycommand.param eters
.add("@mydate", SqlDbType.DateT ime).value = mydatevar
.add("@id", SqlDbType.Int). value = SomeIntegerValu e
end with

MyCommand.execu tenonquery
In addition, see the T-SQL reference:
http://msdn.microsoft.com/library/en...ua-uz_82n9.asp

....leading you to:
http://msdn.microsoft.com/library/en...ea-ez_4aur.asp

....leading you to:
http://msdn.microsoft.com/library/en...ca-co_1n1v.asp
(see "datetime constants")
Armin

Jan 25 '06 #3
Hi
This is my little guide :
- For dates, use date variables, not into strings. That way you can
do arithmetics, format properly , passs parameters without problems etc
- Use Cdate when picking up dates/times from text fields
- When calling SQLprocedures, use parameters.
- When building an SQL string in a (VB) program, use date format
yyyy-mm-dd , ie. today is 2006-01-25 , and format explicitly ,
do not rely on implicit (locale dependent) formatting.
ie. SQLtext = ... & format (date_var,"yyyy-mm-dd hh:MM:ss") & ...
The somewhat exotic format does not matter inside a program, the important
thing
is that SQLserver never fails to understand you correctly.
No more lottery if 01/04/06 is April 1st or January 4th or ...
Matti

"Jerome" <Jo*****@fake.c om> wrote in message
news:yw******** **************@ phobos.telenet-ops.be...
Hallo,
I know a lot has already been told about date/time fields in a database
but still confuses me, specif when dealing with SQLserver(Expre ss).
It seems that sqlserver only accepts the date in a "yyyyMMdd" format?
(difference between Express and MSDE2000A ?)
What is the one and only true way to deal with this problem in VB2005:
Local settings are Dutch (Belgium) ; thus date is in "dd/MM/yy" (or
perhaps dd/MM/yyyy) and time in "hh:mm:ss"

dim MyDateVar as string, MyIdVar as Integer
dim MyCommand = New Sqlcommand("",C onnection)
MyCommand.comma ndtext = "Update MyTable Set MyDatefield = '" & MyDateVar &
"' Where MyIdField = " & MyIdVar = SomeIntegerValu e
MyCommand.execu tenonquery

How to deal with the MyDateVar when:

1.
The Variable comes from a textbox knowing that the user puts in dd/MMyyyy
In this case there is no need to have the time with it.

2.
The date comes from a datetimepicker control
(MyDateVar = DtPicker.Value) ?

3.
The date and time comes from the system
MyDateVar= Format(DateTime .Now, "yyyyMMdd") seems to work but
Format(DateTime .Now, "yyyyMMdd.hhmms s") gives a runtime error

So, any help and/or suggestion on this will be greatly appreciated.
Thanks and greetings to all
Jerome

Jan 25 '06 #4
I'm a database person, so from a database perspective:

Make sure the variable in the client is date datatype, not string.
Pass it though a command object and a parameter object to SQL Server = you are safe. ADO will do the
string conversion for you.
If you absolutely want to pass it as a string to SQL Server, read
http://www.karaszi.com/SQLServer/info_datetime.asp

--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Jerome" <Jo*****@fake.c om> wrote in message news:yw******** **************@ phobos.telenet-ops.be...
Hallo,
I know a lot has already been told about date/time fields in a database but still confuses me,
specif when dealing with SQLserver(Expre ss).
It seems that sqlserver only accepts the date in a "yyyyMMdd" format? (difference between Express
and MSDE2000A ?)
What is the one and only true way to deal with this problem in VB2005:
Local settings are Dutch (Belgium) ; thus date is in "dd/MM/yy" (or perhaps dd/MM/yyyy) and time
in "hh:mm:ss"

dim MyDateVar as string, MyIdVar as Integer
dim MyCommand = New Sqlcommand("",C onnection)
MyCommand.comma ndtext = "Update MyTable Set MyDatefield = '" & MyDateVar & "' Where MyIdField = "
& MyIdVar = SomeIntegerValu e
MyCommand.execu tenonquery

How to deal with the MyDateVar when:

1.
The Variable comes from a textbox knowing that the user puts in dd/MMyyyy
In this case there is no need to have the time with it.

2.
The date comes from a datetimepicker control
(MyDateVar = DtPicker.Value) ?

3.
The date and time comes from the system
MyDateVar= Format(DateTime .Now, "yyyyMMdd") seems to work but Format(DateTime .Now,
"yyyyMMdd.hhmms s") gives a runtime error

So, any help and/or suggestion on this will be greatly appreciated.
Thanks and greetings to all
Jerome


Jan 25 '06 #5
Hoi Friends,
Thanks very much the answers. At least these are short, understandable and
valuable answers! Far more better than all the microsoft stuff readings.
I will try the suggestions right away when my sqlserverExpres s is working
again. Yesterday Mr. Murphy came to visit and ruined my VS2005 and
Sqlexpress. Nice!
Anyway, the answers leaves my with one more question:
What are the benifits of using Parameters instead plain variables (for
numeric or charachter fields at least)?
As i can see at a first glance there is a lot more wrtiting to do for the
Parameters. (adding them to a command before they are usable, defining the
number of chars for a string param, etc,etc)?
For instance: If the client decides that a stringfield should have more
characters capacity, one should go trough the whole project and adjust the
number of chars for the Params that points to that specific field? Or can
one program a param with, let's say 100 chars, where the field is only 50
chars ? The max charachters is limited by the maxlength property of the
textbox anyway.

Thanks once again for the answers and suggestions
Jerome
"Tibor Karaszi" <ti************ *************** @hotmail.nomail .com> schreef
in bericht news:ea******** ******@TK2MSFTN GP14.phx.gbl...
I'm a database person, so from a database perspective:

Make sure the variable in the client is date datatype, not string.
Pass it though a command object and a parameter object to SQL Server = you
are safe. ADO will do the string conversion for you.
If you absolutely want to pass it as a string to SQL Server, read
http://www.karaszi.com/SQLServer/info_datetime.asp

--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Jerome" <Jo*****@fake.c om> wrote in message
news:yw******** **************@ phobos.telenet-ops.be...
Hallo,
I know a lot has already been told about date/time fields in a database
but still confuses me, specif when dealing with SQLserver(Expre ss).
It seems that sqlserver only accepts the date in a "yyyyMMdd" format?
(difference between Express and MSDE2000A ?)
What is the one and only true way to deal with this problem in VB2005:
Local settings are Dutch (Belgium) ; thus date is in "dd/MM/yy" (or
perhaps dd/MM/yyyy) and time in "hh:mm:ss"

dim MyDateVar as string, MyIdVar as Integer
dim MyCommand = New Sqlcommand("",C onnection)
MyCommand.comma ndtext = "Update MyTable Set MyDatefield = '" & MyDateVar
& "' Where MyIdField = " & MyIdVar = SomeIntegerValu e
MyCommand.execu tenonquery

How to deal with the MyDateVar when:

1.
The Variable comes from a textbox knowing that the user puts in dd/MMyyyy
In this case there is no need to have the time with it.

2.
The date comes from a datetimepicker control
(MyDateVar = DtPicker.Value) ?

3.
The date and time comes from the system
MyDateVar= Format(DateTime .Now, "yyyyMMdd") seems to work but
Format(DateTime .Now, "yyyyMMdd.hhmms s") gives a runtime error

So, any help and/or suggestion on this will be greatly appreciated.
Thanks and greetings to all
Jerome

Jan 26 '06 #6
> What are the benifits of using Parameters instead plain variables (for numeric or charachter
fields at least)?
* Avoid "SQL Injection" (Google and you will find.)

* Assuming that ADO.NET is smart enough to execute your code using sp_executesql and make parameters
for that out of your ADO.NET parameters: You will have a lot greater chance for your query plan to
be re-used.
If you just build a string and first search for "johnson", then SQL Server can cache that plan. But
that cached plan is identified (basically) based on all the text in the query. "johnson" is a part
of that text. Next time, you search for "smith", and SQL Server first searches for a plan match.
Such doesn't exists (you searched for "johnson" last time). So a new plan will be added to plan
cache for this query with "smith" embedded. I've seen installations with 10,000 instances of plans
in cache for the same query! And how much memory is now available for caching data? Not to speak
about the overhead of searching through many many thousands of plans in cache in order to find a
match - every time you execute a query - in vain. If they were parametized, then you'd have only one
plan for the query in cache, and SQL Server would substitute the parameters.

* Better yet, use stored procedures. This way you also have control over if this plan should be
cached in the first place and also plan recompiles. Along with bunch of other advantages of using
stored procedures.

*"Feels better"

I bet others can jump in with other advantages.

--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Jerome" <Jo*****@fake.c om> wrote in message news:oK******** **************@ phobos.telenet-ops.be... Hoi Friends,
Thanks very much the answers. At least these are short, understandable and valuable answers! Far
more better than all the microsoft stuff readings.
I will try the suggestions right away when my sqlserverExpres s is working again. Yesterday Mr.
Murphy came to visit and ruined my VS2005 and Sqlexpress. Nice!
Anyway, the answers leaves my with one more question:
What are the benifits of using Parameters instead plain variables (for numeric or charachter
fields at least)?
As i can see at a first glance there is a lot more wrtiting to do for the Parameters. (adding them
to a command before they are usable, defining the number of chars for a string param, etc,etc)?
For instance: If the client decides that a stringfield should have more characters capacity, one
should go trough the whole project and adjust the number of chars for the Params that points to
that specific field? Or can one program a param with, let's say 100 chars, where the field is only
50 chars ? The max charachters is limited by the maxlength property of the textbox anyway.

Thanks once again for the answers and suggestions
Jerome
"Tibor Karaszi" <ti************ *************** @hotmail.nomail .com> schreef in bericht
news:ea******** ******@TK2MSFTN GP14.phx.gbl...
I'm a database person, so from a database perspective:

Make sure the variable in the client is date datatype, not string.
Pass it though a command object and a parameter object to SQL Server = you are safe. ADO will do
the string conversion for you.
If you absolutely want to pass it as a string to SQL Server, read
http://www.karaszi.com/SQLServer/info_datetime.asp

--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Jerome" <Jo*****@fake.c om> wrote in message
news:yw******** **************@ phobos.telenet-ops.be...
Hallo,
I know a lot has already been told about date/time fields in a database but still confuses me,
specif when dealing with SQLserver(Expre ss).
It seems that sqlserver only accepts the date in a "yyyyMMdd" format? (difference between
Express and MSDE2000A ?)
What is the one and only true way to deal with this problem in VB2005:
Local settings are Dutch (Belgium) ; thus date is in "dd/MM/yy" (or perhaps dd/MM/yyyy) and time
in "hh:mm:ss"

dim MyDateVar as string, MyIdVar as Integer
dim MyCommand = New Sqlcommand("",C onnection)
MyCommand.comma ndtext = "Update MyTable Set MyDatefield = '" & MyDateVar & "' Where MyIdField =
" & MyIdVar = SomeIntegerValu e
MyCommand.execu tenonquery

How to deal with the MyDateVar when:

1.
The Variable comes from a textbox knowing that the user puts in dd/MMyyyy
In this case there is no need to have the time with it.

2.
The date comes from a datetimepicker control
(MyDateVar = DtPicker.Value) ?

3.
The date and time comes from the system
MyDateVar= Format(DateTime .Now, "yyyyMMdd") seems to work but Format(DateTime .Now,
"yyyyMMdd.hhmms s") gives a runtime error

So, any help and/or suggestion on this will be greatly appreciated.
Thanks and greetings to all
Jerome



Jan 26 '06 #7
Hoi Tibor,
That explains a lot.
SQL Injection, in my case, is unlikely to occur.They are not going to tamper
with the application. There are a maximu of 4 persons working with the
application and the whole bunch is not even connected to the internet.
Nobody at the site in question ever heard about Sql not to speak about
running a query! I was obliged to use an existing MsAccess Db as backend
(they already are working for years with Access) ;-) and i had to enhance
and expanding the application. So, rewriting 200+ functions!?
Now i'm trying for myself and for learning purposes to rebuild parts of the
applic in VB2005 and with a sqlexpress as backend and that's when i ran into
those date problems. Perhaps that explains a bit more my questions and i am
happy that people like you and others are willing to give advice. If you
have to learn it from the books of Microsoft.....p fff. Even for a simple
readonly lookup table and a combobox they lead trough a complete
strongly-typed dataset! Ridicolous

Anyway, thanks a lot for the feedback
Jerome

"Tibor Karaszi" <ti************ *************** @hotmail.nomail .com> schreef
in bericht news:eF******** ******@TK2MSFTN GP09.phx.gbl...
What are the benifits of using Parameters instead plain variables (for
numeric or charachter fields at least)?


* Avoid "SQL Injection" (Google and you will find.)

* Assuming that ADO.NET is smart enough to execute your code using
sp_executesql and make parameters for that out of your ADO.NET parameters:
You will have a lot greater chance for your query plan to be re-used.
If you just build a string and first search for "johnson", then SQL Server
can cache that plan. But that cached plan is identified (basically) based
on all the text in the query. "johnson" is a part of that text. Next time,
you search for "smith", and SQL Server first searches for a plan match.
Such doesn't exists (you searched for "johnson" last time). So a new plan
will be added to plan cache for this query with "smith" embedded. I've
seen installations with 10,000 instances of plans in cache for the same
query! And how much memory is now available for caching data? Not to speak
about the overhead of searching through many many thousands of plans in
cache in order to find a match - every time you execute a query - in vain.
If they were parametized, then you'd have only one plan for the query in
cache, and SQL Server would substitute the parameters.

* Better yet, use stored procedures. This way you also have control over
if this plan should be cached in the first place and also plan recompiles.
Along with bunch of other advantages of using stored procedures.

*"Feels better"

I bet others can jump in with other advantages.

--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Jerome" <Jo*****@fake.c om> wrote in message
news:oK******** **************@ phobos.telenet-ops.be...
Hoi Friends,
Thanks very much the answers. At least these are short, understandable
and valuable answers! Far more better than all the microsoft stuff
readings.
I will try the suggestions right away when my sqlserverExpres s is working
again. Yesterday Mr. Murphy came to visit and ruined my VS2005 and
Sqlexpress. Nice!
Anyway, the answers leaves my with one more question:
What are the benifits of using Parameters instead plain variables (for
numeric or charachter fields at least)?
As i can see at a first glance there is a lot more wrtiting to do for the
Parameters. (adding them to a command before they are usable, defining
the number of chars for a string param, etc,etc)?
For instance: If the client decides that a stringfield should have more
characters capacity, one should go trough the whole project and adjust
the number of chars for the Params that points to that specific field? Or
can one program a param with, let's say 100 chars, where the field is
only 50 chars ? The max charachters is limited by the maxlength property
of the textbox anyway.

Thanks once again for the answers and suggestions
Jerome
"Tibor Karaszi" <ti************ *************** @hotmail.nomail .com>
schreef in bericht news:ea******** ******@TK2MSFTN GP14.phx.gbl...
I'm a database person, so from a database perspective:

Make sure the variable in the client is date datatype, not string.
Pass it though a command object and a parameter object to SQL Server =
you are safe. ADO will do the string conversion for you.
If you absolutely want to pass it as a string to SQL Server, read
http://www.karaszi.com/SQLServer/info_datetime.asp

--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Jerome" <Jo*****@fake.c om> wrote in message
news:yw******** **************@ phobos.telenet-ops.be...
Hallo,
I know a lot has already been told about date/time fields in a database
but still confuses me, specif when dealing with SQLserver(Expre ss).
It seems that sqlserver only accepts the date in a "yyyyMMdd" format?
(difference between Express and MSDE2000A ?)
What is the one and only true way to deal with this problem in VB2005:
Local settings are Dutch (Belgium) ; thus date is in "dd/MM/yy" (or
perhaps dd/MM/yyyy) and time in "hh:mm:ss"

dim MyDateVar as string, MyIdVar as Integer
dim MyCommand = New Sqlcommand("",C onnection)
MyCommand.comma ndtext = "Update MyTable Set MyDatefield = '" &
MyDateVar & "' Where MyIdField = " & MyIdVar = SomeIntegerValu e
MyCommand.execu tenonquery

How to deal with the MyDateVar when:

1.
The Variable comes from a textbox knowing that the user puts in
dd/MMyyyy
In this case there is no need to have the time with it.

2.
The date comes from a datetimepicker control
(MyDateVar = DtPicker.Value) ?

3.
The date and time comes from the system
MyDateVar= Format(DateTime .Now, "yyyyMMdd") seems to work but
Format(DateTime .Now, "yyyyMMdd.hhmms s") gives a runtime error

So, any help and/or suggestion on this will be greatly appreciated.
Thanks and greetings to all
Jerome


Jan 26 '06 #8

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

Similar topics

1
4829
by: Thomas Bartkus | last post by:
If we have a date/time field and are doing frequent queries WHERE {date/time field} BETWEEN TimeA AND TimeB Does it make sense, query speed wise, to create an index on the date/time field? The reason I ask is that TimeA and TimeB are significant down to seconds. My *assumption* is that with a large amount of data scatter very few records will contain duplicate date/time points. And that under these circumstances, indexing will be of...
4
6305
by: Joe User | last post by:
Hi all....I have a feeling this is going to be one of those twisted query questions, but here it goes anyways.... I want to generate a report that shows the chronology of events (represented by field names). Essentially, I would like to sort the DATE FIELDS for each record in the table by the order of the DATES in those DATE FIELDS. For example: record ID= 354
6
6404
by: Mark Reed | last post by:
Hi Guru's, I have created a database to monitor hours I have worked as our payroll department are so crap. I work nights most of the time but occasionally I have to work on days. Between the hours of 18:00 and 06:00 colleagues get an unsocial shift allowance. I have managed to get it to work out my gross income for a 4 week period accounting for overtime ect but I am struggling to get the unsocial shift allowance included. All is well...
2
3173
by: rivka.howley | last post by:
I wrote some code that creates a table with a date/time field at 15-minute intervals. Here's how I create and populate the table With tblDataTemp ..Fields.Append .CreateField("CT_ID", dbLong) ..Fields.Append .CreateField(strTmpIDFld, dbLong) ..Fields.Append .CreateField(strTmpDateFld, dbDate) ..Fields.Append .CreateField(strTmpDataFld, dbDouble)
3
3715
by: RSB | last post by:
Hi Every one , IS there any Date Time Control with .Net. All i want to read is the Date and Time in a Single Field like 12/31/2004 09:23:23AM. if there is any then any examples for it. and if not then how to Validate the Text field for above. thanks RSB
11
5941
by: Dixie | last post by:
How can I programatically, take some Date/Time fields present in a table in the current database and change their type to text? dixie
1
353
by: brino | last post by:
hi all ! i have 2 fields in a form - a Date field & a Time field. these 2 fields have to be combined into the one field which has date & time. i know there must be some code to do this. i have tried, but it only puts the date part of it into the field. any ideas ?? thanks
16
12514
by: pmatzek | last post by:
I am attempting to automate a process involving importing a .txt file into an existing table, changing a date in each record, then exporting the table, again as a .txt file. One field contains a date (yyyy-mm-dd) and another a date/time (yyyy-mm-dd hh:nn:ss). If I do the export manually, the exported data in the .txt file is correct, but if I automate the process using the transfertext action and an export specification, the date field exports...
10
5831
by: ARC | last post by:
Hello all, General question for back-end database that has numerous date fields where the database will be used in regions that put the month first, and regions that do not. Should I save a date format in the table design, such as: mm/dd/yyyy? What I've done for years is to store the date format in date fields, then on the forms, based on their region, I would set the date formats on form_load
0
9889
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
10712
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10344
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9487
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7886
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7058
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5723
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5914
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4536
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.