473,657 Members | 2,432 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

pure vb.net format question

Hi All

Is there an pure vb.net way of doing the following.

Imports Microsoft.Visua lBasic
Format(Now, "dd/mm/yyyy")
Which will return date in string format of 11/02/2005 for example

Thanks in advance
Nov 21 '05 #1
6 8827
TextBox1.Text = Format("dd/mm/yy", DateTime.Now.To ShortDateString )

HTH

Regards Terry Burns

http://TrainingOn.net



"Starbuck" <ke*@kevsbox.co m> wrote in message
news:O3******** *****@tk2msftng p13.phx.gbl...
Hi All

Is there an pure vb.net way of doing the following.

Imports Microsoft.Visua lBasic
Format(Now, "dd/mm/yyyy")
Which will return date in string format of 11/02/2005 for example

Thanks in advance

Nov 21 '05 #2
All you need to do is

now.tostring("d ")

This will use the regional setting to display a short date. But if you want
to hard code the format use

now.tostring("d d/MM/yyyy")

I hope this help

Jon

Hello Starbuck,
Hi All

Is there an pure vb.net way of doing the following.

Imports Microsoft.Visua lBasic
Format(Now, "dd/mm/yyyy")
Which will return date in string format of 11/02/2005 for example
Thanks in advance


Nov 21 '05 #3
DateTime.Now.To String("dd/MM/yyyy")

Chris.

"Starbuck" wrote:
Hi All

Is there an pure vb.net way of doing the following.

Imports Microsoft.Visua lBasic
Format(Now, "dd/mm/yyyy")
Which will return date in string format of 11/02/2005 for example

Thanks in advance

Nov 21 '05 #4
Thanks guys

Best Regards
"Chris Podmore" <Ch**********@d iscussions.micr osoft.com> wrote in message
news:80******** *************** ***********@mic rosoft.com...
DateTime.Now.To String("dd/MM/yyyy")

Chris.

"Starbuck" wrote:
Hi All

Is there an pure vb.net way of doing the following.

Imports Microsoft.Visua lBasic
Format(Now, "dd/mm/yyyy")
Which will return date in string format of 11/02/2005 for example

Thanks in advance

Nov 21 '05 #5
Sorry, this is one way of doing it.

TextBox1.Text = Format(Now, "dddd, MMM d yyyy")
--
Terry Burns
http://TrainingOn.net
"Mr Newbie" <se*****@sdfsdf .com> wrote in message
news:u1******** ******@TK2MSFTN GP15.phx.gbl...
TextBox1.Text = Format("dd/mm/yy", DateTime.Now.To ShortDateString )

HTH

Regards Terry Burns

http://TrainingOn.net



"Starbuck" <ke*@kevsbox.co m> wrote in message
news:O3******** *****@tk2msftng p13.phx.gbl...
Hi All

Is there an pure vb.net way of doing the following.

Imports Microsoft.Visua lBasic
Format(Now, "dd/mm/yyyy")
Which will return date in string format of 11/02/2005 for example

Thanks in advance


Nov 21 '05 #6
Thanks Terry
"Terry Burns" <us@ourWebSite. com> wrote in message
news:uN******** ******@TK2MSFTN GP14.phx.gbl...
Sorry, this is one way of doing it.

TextBox1.Text = Format(Now, "dddd, MMM d yyyy")
--
Terry Burns
http://TrainingOn.net
"Mr Newbie" <se*****@sdfsdf .com> wrote in message
news:u1******** ******@TK2MSFTN GP15.phx.gbl...
TextBox1.Text = Format("dd/mm/yy", DateTime.Now.To ShortDateString )

HTH

Regards Terry Burns

http://TrainingOn.net



"Starbuck" <ke*@kevsbox.co m> wrote in message
news:O3******** *****@tk2msftng p13.phx.gbl...
Hi All

Is there an pure vb.net way of doing the following.

Imports Microsoft.Visua lBasic
Format(Now, "dd/mm/yyyy")
Which will return date in string format of 11/02/2005 for example

Thanks in advance



Nov 21 '05 #7

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

Similar topics

15
2202
by: Christos TZOTZIOY Georgiou | last post by:
Has anyone built PIL (1.1.4 or 1.1.5) for Python 2.4? If yes, please let me know, since I can't test a couple of my apps using PIL with 2.4 . You can even reply by email (yes, I dare use true email in newsgroup postings, but then, I'm postmaster and welcome spam :) TIA -- TZOTZIOY, I speak England very best, "Tssss!" --Brad Pitt as Achilles in unprecedented Ancient Greek
37
4155
by: WittyGuy | last post by:
Hi, I wonder the necessity of constructor and destructor in a Abstract Class? Is it really needed? ? Wg http://www.gotw.ca/resources/clcm.htm for info about ]
18
7365
by: cjl | last post by:
Hey all: I know that it is silly in the age of Google to 'lose' something on the internet, but I recently checked out a project that had implemented a database with a subset of SQL in pure client-side javascript. I forgot to bookmark it, and now I can't find it. Anyone?
6
1768
by: Drazen Gemic | last post by:
Is there any initiative out there aiming to rewrite PHP extensions in pure PHP ? For example, MySQL driver in pure PHP or LDAP extension in pure PHP ? With Java and, as far as I know, Perl, one can extend the language capabilities without having access to any command like gcc, g++, cc or c++ on a system. That way applications could be written without need to bother system administrator to install additional packages. All additional
10
7295
by: Martin Vorbrodt | last post by:
Example code in one of my books intrigues me: class B { public: B* Clone() const { B* p = DoClone(); assert(typeid(*p) == typeid(*this)); return p; }
2
3313
by: ChrisO | last post by:
I've been pretty infatuated with JSON for some time now since "discovering" it a while back. (It's been there all along in JavaScript, but it was just never "noticed" or used by most until recently -- or maybe I should just speak for myself.) The fact that JSON is more elegant goes without saying, yet I can't seem to find a way to use JSON the way I *really* want to use it: to create objects that can be instantated into multiple...
6
4023
by: Miguel Guedes | last post by:
Hello, I recently read an interview with Bjarne Stroustrup in which he says that pure abstract classes should *not* contain any data. However, I have found that at times situations are when it would be useful to have /some/ data defined in such an abstract class for reasons of forming a common block of data existing in or used by all descendant classes (see example below.) In such a case where a common block of data *always* exists,...
3
5381
by: dragonslayer008 | last post by:
I am building a control library in C++/CLI. My project links with a native library and am getting an error that the library cannot work with pure: dxerr.lib(dxerr.obj) : fatal error LNK1313: ijw/native module detected; cannot link with pure modules I am fine switching to CLR mode, but I have a question. If I build the control library DLL in CLR mode, will it still integrate seamlessly into C#/VB projects? Or will I have to change...
14
2742
by: Jack | last post by:
Hi, I meet a question with it , I did not get clear the different betteen them, for example: #include <iostream>
0
8826
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8605
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
7330
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
6166
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
5632
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
4155
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
4306
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1955
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1615
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.