Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > Database and Reporting > more date hassles


Reply
 
Thread Tools Display Modes
  #1  
Old 11-24-2003, 11:34 PM
danny-t danny-t is offline
Junior Contributor
 
Join Date: Sep 2003
Location: Bournemouth, UK
Posts: 349
Default more date hassles


Have had a look around the forum and found out a bit about setting date formats (mainly that its a pain in the (_|_)! )

Anyway i'm returning a date and setting the format of a textbox using: -

Dim s As String
txtTextbox(21) = Format(Date, "dddd" & ", " & " mmmm d" & ", " & "yyyy")

which gives me the exact format I want, only problem is it always just gives todays date even though in the database its stored as a differnt date.

Any help would be really nice
Reply With Quote
  #2  
Old 11-24-2003, 11:36 PM
danny-t danny-t is offline
Junior Contributor
 
Join Date: Sep 2003
Location: Bournemouth, UK
Posts: 349
Default

Quote:
Originally Posted by danny__t
Have had a look around the forum and found out a bit about setting date formats (mainly that its a pain in the (_|_)! )

Anyway i'm returning a date and setting the format of a textbox using: -

Dim s As String
txtTextbox(21) = Format(Date, "dddd" & ", " & " mmmm d" & ", " & "yyyy")

which gives me the exact format I want, only problem is it always just gives todays date even though in the database its stored as a differnt date.

Any help would be really nice



Sorry to have bothered you guys, soon as I posted I sorted it (seem to be doing that a lot lately) well for those interested i changed it to: -

Dim s As String
txtTextbox(21) = Format(txtTextbox(21), "dddd" & ", " & " mmmm d" & ", " & "yyyy")
Reply With Quote
  #3  
Old 11-25-2003, 01:35 PM
noi_max's Avatar
noi_max noi_max is offline
Still asleep...

Retired Leader
* Expert *
 
Join Date: Nov 2003
Location: IronForge
Posts: 2,694
Default

Ahhh yes, helpful, but what's with the variable?

It looks like you're declaring a variable then formatting text. What's the variable for?
__________________
~ Jason

Use [vb][/vb] tags when posting code :) || Search the forum and MSDN|| Check out the Posting Guidelines
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
IF Statement -- Not working?! knovellino Excel 24 11-16-2003 07:39 AM
A Brief History of Time (and Date) BillSoo Tutors' Corner 1 11-11-2003 03:36 PM
English To Nepali Date Conversion Simon Kale General 4 12-02-2002 06:57 PM
Very Strange Homie General 2 04-11-2002 07:12 AM
comparing dates with visual foxpro and ado azwaan General 8 01-08-2002 05:50 AM

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->