UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Simple Expression Builder Question, Access 2016    
 
   
Access77
post Aug 29 2019, 10:33 PM
Post#1



Posts: 1
Joined: 29-August 19



I am creating the Access expression builder to create a field in a table, drawing from other fields in the same table.

I have an existing date field in the table that has the format dd/mm/yy.

I want to get the month from this existing date field.

The expression I am using is:

& Month([Date])

This works, but for single digit months (eg January), only return 1

I need the returned value to be 01.

Can someone please assist.
Go to the top of the page
 
arnelgp
post Aug 29 2019, 10:44 PM
Post#2



Posts: 1,427
Joined: 2-April 09
From: somewhere out there...


& Format(Month([Date]), "00")
This post has been edited by arnelgp: Aug 29 2019, 10:45 PM

--------------------
Never stop learning, because life never stops teaching.
Go to the top of the page
 
projecttoday
post Aug 29 2019, 10:50 PM
Post#3


UtterAccess VIP
Posts: 11,056
Joined: 10-February 04
From: South Charleston, WV


=Format([datefield],"mm")

--------------------
Robert Crouser
Go to the top of the page
 
theDBguy
post Aug 29 2019, 11:29 PM
Post#4


Access Wiki and Forums Moderator
Posts: 76,380
Joined: 19-June 07
From: SunnySandyEggo


Hi. Welcome to UA! welcome2UA.gif

Looks like this is crossposted here.

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
 


Custom Search


RSSSearch   Top   Lo-Fi    15th October 2019 - 03:46 PM