Trying to convert "M" month field into "MM&qu

Richcta

New Member
Joined
Apr 21, 2005
Messages
4
This expression: Expr1: Month([tbl_ridedata]) strips out the month from a date field. the date field appears as M/D/YYYY. I need the month to be MM as in January being 01, etc. I usually work in PL/SQL and am under a time deadline so any help from anyone is appreciated.
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
I don't understand 100% what you mean but have you looked at the Format function?

Expr1:Format([tbl_ridedata], "MM")
 
Upvote 0
Norie:

The current query is an insert query. It takes the month part of the date and inserts it into another table. A change was made somewhere without informing those responsible for the tables and programs and a problem arose. the table the data is inserted since the change now has month in the MM AND M formats. Some of our queries and insert code is not working because of the change. We need to make that M an MM for this reason. I will try your suggestion. Thanks.
 
Upvote 0
Its invalid syntax. I need the month stripped out in "MM" format. this gets inserted into another table.
 
Upvote 0
What do you mean?

Where are you trying to use this? In an Access query?
 
Upvote 0
Yes. The access query takes the month part of the date field and inserts it via ODBC into a PL/SQL table. We cannot select on the PL/SQL table because the month field (composed of the month part of the date field in the access table) is a mixture of M and MM. Therefore when we take out the month part of the date field in the Access table they all need to be MM format months.
 
Upvote 0

Forum statistics

Threads
1,221,905
Messages
6,162,770
Members
451,786
Latest member
CALEB23

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top