473,497 Members | 2,184 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Date time format

I've been reading a confusing guideregarding Datetime format on MSDN.
All I need is to get the following output from Datetimepicker value:

MM/dd/yyyy 00:00:00 (hh:mm:ss always zero)

For example,

'06/16/2006 00:00:00'

I tried format(datetime, "MM/dd/yyyy") but it never worked!

Thanks a million.

Bill
Jun 16 '06 #1
4 1534
on solution is

a) set Format to Custom
b) set CustomFormat to MM/dd/yyyy 00:00:00

use datetimepicker's Text property instead of Value property

Mex

"Bill Nguyen" <bi*****************@jaco.com> wrote in message
news:OQ**************@TK2MSFTNGP05.phx.gbl...
I've been reading a confusing guideregarding Datetime format on MSDN.
All I need is to get the following output from Datetimepicker value:

MM/dd/yyyy 00:00:00 (hh:mm:ss always zero)

For example,

'06/16/2006 00:00:00'

I tried format(datetime, "MM/dd/yyyy") but it never worked!

Thanks a million.

Bill

Jun 16 '06 #2
Thanks Meelis;
This works.

What are the other ways?

Bill
"Meelis" <me*@hot.ee> wrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
on solution is

a) set Format to Custom
b) set CustomFormat to MM/dd/yyyy 00:00:00

use datetimepicker's Text property instead of Value property

Mex

"Bill Nguyen" <bi*****************@jaco.com> wrote in message
news:OQ**************@TK2MSFTNGP05.phx.gbl...
I've been reading a confusing guideregarding Datetime format on MSDN.
All I need is to get the following output from Datetimepicker value:

MM/dd/yyyy 00:00:00 (hh:mm:ss always zero)

For example,

'06/16/2006 00:00:00'

I tried format(datetime, "MM/dd/yyyy") but it never worked!

Thanks a million.

Bill


Jun 16 '06 #3
hi

other way is to use iFormatProvider
DateTimePicker.Value.ToString("MM/dd/yyyy 00:00:00")

Meelis


"Bill Nguyen" <bi*****************@jaco.com> wrote in message
news:eo**************@TK2MSFTNGP04.phx.gbl...
Thanks Meelis;
This works.

What are the other ways?

Bill
"Meelis" <me*@hot.ee> wrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
on solution is

a) set Format to Custom
b) set CustomFormat to MM/dd/yyyy 00:00:00

use datetimepicker's Text property instead of Value property

Mex

"Bill Nguyen" <bi*****************@jaco.com> wrote in message
news:OQ**************@TK2MSFTNGP05.phx.gbl...
I've been reading a confusing guideregarding Datetime format on MSDN.
All I need is to get the following output from Datetimepicker value:

MM/dd/yyyy 00:00:00 (hh:mm:ss always zero)

For example,

'06/16/2006 00:00:00'

I tried format(datetime, "MM/dd/yyyy") but it never worked!

Thanks a million.

Bill



Jun 17 '06 #4
Thanks again

Bill
"Meelis" <me*@hot.ee> wrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
hi

other way is to use iFormatProvider
DateTimePicker.Value.ToString("MM/dd/yyyy 00:00:00")

Meelis


"Bill Nguyen" <bi*****************@jaco.com> wrote in message
news:eo**************@TK2MSFTNGP04.phx.gbl...
Thanks Meelis;
This works.

What are the other ways?

Bill
"Meelis" <me*@hot.ee> wrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
> on solution is
>
> a) set Format to Custom
> b) set CustomFormat to MM/dd/yyyy 00:00:00
>
> use datetimepicker's Text property instead of Value property
>
>
>
> Mex
>
>
>
> "Bill Nguyen" <bi*****************@jaco.com> wrote in message
> news:OQ**************@TK2MSFTNGP05.phx.gbl...
>> I've been reading a confusing guideregarding Datetime format on MSDN.
>> All I need is to get the following output from Datetimepicker value:
>>
>> MM/dd/yyyy 00:00:00 (hh:mm:ss always zero)
>>
>> For example,
>>
>> '06/16/2006 00:00:00'
>>
>> I tried format(datetime, "MM/dd/yyyy") but it never worked!
>>
>> Thanks a million.
>>
>> Bill
>>
>>
>
>



Jun 20 '06 #5

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

Similar topics

12
29418
by: Assimalyst | last post by:
Hi, I have a working script that converts a dd/mm/yyyy text box date entry to yyyy/mm/dd and compares it to the current date, giving an error through an asp.net custom validator, it is as...
7
2753
by: mr.nimz | last post by:
hello, this is antenio. recently i've come to a problem. i got a way through it, somehow, still it left me in a curious state, so i'm posting it here, if i can get an answer from some techy, ...
10
5786
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...
30
5639
by: fniles | last post by:
On my machine in the office I change the computer setting to English (UK) so the date format is dd/mm/yyyy instead of mm/dd/yyyy for US. This problem happens in either Access or SQL Server. In the...
2
3650
by: nospam | last post by:
I have some data that I need to run date diffs on. The catch is that for some of this data, there is a date value in one of the fields, with no time. It might look like this: ROW DT1 ...
0
6991
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...
1
6878
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...
0
5456
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,...
1
4897
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...
0
4583
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...
0
3078
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1405
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 ...
1
649
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
286
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.