Hi,
How to format Date (mm/dd/yyyy to dd/mm/yyyy) . Please help me.
Printable View
Hi,
How to format Date (mm/dd/yyyy to dd/mm/yyyy) . Please help me.
Moved from CodeBank (which is for examples, not questions)
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/yyyyQuote:
Originally Posted by Al42
use dis
MsgBox Format(Date, "dd/MMM/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).
I was applyng the format function to Date$ instead of Date
That seemed to be the problem :eek2: