PC Review


Reply
Thread Tools Rate Thread

Convert now (current date and time) to a string ddmmyyyyhhnn.

 
 
David Langschied
Guest
Posts: n/a
 
      3rd Nov 2008
I have been looking through the threads here on converting the current time
to a string and it seems to look a lot more complicated that it should be. I
am not a VB programmer (though a play one on TV). I have done alot of other
programming and it is usually as smiple as:

dateaschar = string(now, "mmddyyyyhhnn")

I realize that I may have to do that date and time separately.


 
Reply With Quote
 
 
 
 
Mike
Guest
Posts: n/a
 
      3rd Nov 2008
Sub playOnTv()
dateaschar = Format(Now, "mmddyyyyhhnn")
MsgBox dateaschar
End Sub

"David Langschied" wrote:

> I have been looking through the threads here on converting the current time
> to a string and it seems to look a lot more complicated that it should be. I
> am not a VB programmer (though a play one on TV). I have done alot of other
> programming and it is usually as smiple as:
>
> dateaschar = string(now, "mmddyyyyhhnn")
>
> I realize that I may have to do that date and time separately.
>
>

 
Reply With Quote
 
David Langschied
Guest
Posts: n/a
 
      5th Nov 2008


"Mike" wrote:

> Sub playOnTv()
> dateaschar = Format(Now, "mmddyyyyhhnn")
> MsgBox dateaschar
> End Sub
>
> "David Langschied" wrote:
>
> > I have been looking through the threads here on converting the current time
> > to a string and it seems to look a lot more complicated that it should be. I
> > am not a VB programmer (though a play one on TV). I have done alot of other
> > programming and it is usually as smiple as:
> >
> > dateaschar = string(now, "mmddyyyyhhnn")
> >
> > I realize that I may have to do that date and time separately.
> >
> >

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert a latebinded DataTable column's format from DateTime to string (or format the date time value) RSH Microsoft VB .NET 0 6th Dec 2006 03:49 PM
convert string to date & time n191975@yahoo.ca Microsoft Excel Worksheet Functions 4 30th Oct 2006 04:26 PM
String DDMMYYYYHHNN to DateTime Peter Microsoft Dot NET Compact Framework 8 20th Jul 2005 08:24 AM
Convert Seconds from 1980 to current date/time Joe Williams Microsoft Access Queries 2 14th Jul 2004 07:02 AM
String Convert to Date Time Problem is Windows 98 Ryanfai Microsoft VB .NET 2 23rd Sep 2003 04:38 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:07 AM.