|
Post by paul on Jul 4, 2006 18:35:42 GMT
How do you make the date$ function in qb only print the day and the month but not the year like 07-04 not like 07-04-2006
|
|
|
Post by Fumador on Jul 5, 2006 8:13:15 GMT
CLS COLOR 7, 4 PRINT DATE$ PRINT bbb$ = LEFT$(DATE$, 5) PRINT bbb$
|
|
|
Post by Mikrondel on Jul 10, 2006 12:35:43 GMT
To be a bit more informative:
DATE$ returns a string representation of the date. LEFT$ takes a string and returns the first X characters of it.
E.g. LEFT$("I am weak", 2) would return the string "I "
In this case the day and month will be the first 5 characters of the date returned by DATE$ so LEFT$ is perfect. (See also: MID$, RIGHT$)
|
|