to get date and month from table which has data like 24--sep-1988

L

lakshmi

how to write the selection formula to get only date and month from database
which has date format like 24-sep-1988,3-jun-1992etc to compare with the
string which has date and month like 24-7.
 
S

Srini

Lakshmi,

Try this ...
1. Get the normal date from the database like 24-sep-1988
then format the date using

2. Format(Now, "MMMM dd, yyyy")
"Now" is the current date or you can declare any variable

below are different ways of formatting
d: 1-30
dd: 1-30
ww: 1-51
mmm: Displays full month names (Hijri month names have no
abbreviations).
y: 1-355
yyyy: 100-9666

3. after formating store ina variable and compare with 24-7

Pls check in microsoft VB help for different formats

Thanks
Srini
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top