Date Range conversions

  • Thread starter Thread starter Bryan
  • Start date Start date
B

Bryan

hey gang, quick question. If i want to take a date that
falls between a certain range, and convert it to another
field as a text item, how would i do this? for example
if i wanted any date that fell between 01/01/2002 and
12/31/2002 to convert to MS02(Mission Status 2002), how
can this be done that is simple, and quick?
 
NewField: "MS02" & Format(Year([MyDate]), "0000)

--
John Viescas, author
"Microsoft Office Access 2003 Inside Out"
"Running Microsoft Access 2000"
"SQL Queries for Mere Mortals"
http://www.viescas.com/
(Microsoft Access MVP since 1993)
 
Bryan said:
hey gang, quick question. If i want to take a date that
falls between a certain range, and convert it to another
field as a text item, how would i do this? for example
if i wanted any date that fell between 01/01/2002 and
12/31/2002 to convert to MS02(Mission Status 2002), how
can this be done that is simple, and quick?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Huh? Do you mean you want any date in the year 2002 to be converted
to MS02?

"MS" & Format(DateColumn, "yy")

Or (all one line):

"MS" & Format(DateColumn, "yy") &
"(Mission Status " & Format(DateColumn, "yyyy") & " )"

- --
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQFivIYechKqOuFEgEQIJLQCdFjLbJuCF61H265UbyblTPFuvRyMAoOoS
P5On5cnBZjCUb7nJFe39BXeC
=nxPn
-----END PGP SIGNATURE-----
--
 
That works great guys thanks. ok now here is the kicker,
what if i wanted to alter the range to span a year like
10/01/01 to 09/30/02 for my range and have that set as
MS02.
10/01/02 to 09/30/03 would be MS03. any ideas on that
one?
 
Add 3 months to the date before you do you calculation'

"MS" & Format(DateAdd("m",3,DateColumn,"yy")
 
works like a charm, thanks guys
-----Original Message-----
Add 3 months to the date before you do you calculation'

"MS" & Format(DateAdd("m",3,DateColumn,"yy")

.
 
Back
Top