format datetime

  • Thread starter Thread starter iccsi
  • Start date Start date
I

iccsi

I would like to have show year and month only for the date time value
and found that formatdatetime needs to choose vbGeneral, vbLongDate,
vbShortDate...etc which includes year, month and day.


Any suggestions are appreciated,


Inung
 
Format([YourDateTimeField], "yyyymmm"

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.
 
Oops, forgot the closing parenthesis)

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.
 
Format([YourDateTimeField], "yyyymmm"

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.




I would like to have show year and month only for the date time value
and found that formatdatetime needs to choose vbGeneral, vbLongDate,
vbShortDate...etc which includes year, month and day.
Any suggestions are appreciated,
Inung- Hide quoted text -

- Show quoted text -

Thanks millions,
 
I do not know where you want it displayed but the Format function will do it
---
Format([YourField], "yyyy m") shows 2010 1
Format([YourField], "yyyy mm") shows 2010 01
Format([YourField], "yyyy mmm") shows 2010 JAN
Format([YourField], "yyyy mmmm") shows 2010 January
Format([YourField], "mmm yyyy") shows JAN 2010
 
I would like to have show year and month only for the date time value
and found that formatdatetime needs to choose vbGeneral, vbLongDate,
vbShortDate...etc which includes year, month and day.

You can use the predefined formats... OR you can roll your own.

Set the Format property of a textbox to "yy/mm" to display "10/01" for
example.
 
You can use the predefined formats... OR you can roll your own.

Set the Format property of a textbox to "yy/mm" to display "10/01" for
example.

Thanks millions,
 
Back
Top