Format Ledger Date text field yyyymm

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm using Access 2002 and 2003.

I have a ledger date field that is text, ex: 200606 = YearMo

I'm trying to just get the month to display (for 200603 = Mar)

I'm a little new at this, so I've tried:

Month: Format(right([ledger date],2),"mmm")
oddly 200601 will return Dec and everything else returns Jan

Can someone help me figure out what I'm missing?
 
You would use the Format(...,"mmm") with date fields. Right([ledger date],2)
returns a string value of "06". Access is kind enough to convert this to a
date for you. That date is 6 which is actually #1/5/1900#.

You should not leave conversions to chance. Try
MonthName(Val(right([ledger date],2)))
Or
Format(DateSerial(2000,Val(right([ledger date],2)),1),"mmm")
 

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

Similar Threads

Excel display two dates in one cell - excel 2010 2
general ledger 1
Excel Help with dates 2
Crosstab returns blank fields 6
Format DatePart 4
field with date formatted as string 6
CrossTab Query Format 2
Create new date column 4

Back
Top