convert date to text

  • Thread starter Thread starter hermie
  • Start date Start date
H

hermie

Hello

Not know it this is possible, but I like to convert a date field to a text
field in this way: 12/13/04 to T13
T represent de first letter of the day and 13 the number of the day.
Is this possible?

Herman
 
Check Access HELP for date-related functions. If I recall correctly,
there's a WeekDayName() function that would return "Thursday", then you
could use the Left() function to get "T". You might use the ?DatePart()
function to get the "13". Then you'd concatenate them all together
(probably in a query).

I'll point out that you'd have no way to know whether "T13" represented
Tuesday the 13th or Thursday the 13th...

Perhaps if you described a bit more about what business need you are trying
to solve, the 'group readers could offer alternative approaches...
 
Herman,

An expression like:

Left(Format([fDate],"ddd"),1) & Day([fDate])

will return what you want, assuming fDate to be the name of your
existing date field. The question is, though, how do you diferenciate T
for Tuesday from T for Thursday and S for Saturday from S for Sunday?

HTH,
Nikos
 
Jeff
Thanks for responding i got it work.
I know that tuesday and thursday have the same letter.
But i want to use it in pivottableview for a schooldatabase to make the view
more visible. like:
M1 T2 W3 T4 F5 M8 T9 W10 ETC.
name1 -
name2 - - -

Herman
 
Back
Top