|
-
Jun 22nd, 2006, 08:11 AM
#1
Thread Starter
New Member
How to format Date (mm/dd/yyyy to dd/mm/yyyy)
Hi,
How to format Date (mm/dd/yyyy to dd/mm/yyyy) . Please help me.
-
Jun 22nd, 2006, 09:52 AM
#2
Re: How to format Date (mm/dd/yyyy to dd/mm/yyyy)
Moved from CodeBank (which is for examples, not questions)
-
Jun 22nd, 2006, 11:25 AM
#3
Re: How to format Date (mm/dd/yyyy to dd/mm/yyyy)
sdDate = Format$(smDate, "dd/mm/yyyy")
Where sdDate is a string variable that gets the date in dd/mm/yyyy format and smDate is a string variable having the date in mm/dd/yyyy format.
The most difficult part of developing a program is understanding the problem.
The second most difficult part is deciding how you're going to solve the problem.
Actually writing the program (translating your solution into some computer language) is the easiest part.
Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.
Please Help Us To Save Ana
-
Jul 3rd, 2006, 09:01 AM
#4
Member
Re: How to format Date (mm/dd/yyyy to dd/mm/yyyy)
 Originally Posted by Al42
sdDate = Format$(smDate, "dd/mm/yyyy")
Where sdDate is a string variable that gets the date in dd/mm/yyyy format and smDate is a string variable having the date in mm/dd/yyyy format.
This doesn't work. It still returns the format mm/dd/yyyy
-
Jul 3rd, 2006, 09:05 AM
#5
Hyperactive Member
Re: How to format Date (mm/dd/yyyy to dd/mm/yyyy)
use dis
MsgBox Format(Date, "dd/MMM/yyyy")
-
Jul 3rd, 2006, 09:07 AM
#6
Re: How to format Date (mm/dd/yyyy to dd/mm/yyyy)
How are you actually using it?
Are you putting the value into a String variable (or a label caption etc), or are you putting it into a Date variable (which cannot contain formatting, so will use the default format).
-
Jul 3rd, 2006, 10:31 AM
#7
Member
Re: How to format Date (mm/dd/yyyy to dd/mm/yyyy)
I was applyng the format function to Date$ instead of Date
That seemed to be the problem
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|