Page 1 of 4 1234 LastLast
Results 1 to 15 of 54
  1. #1
    Sonyat810 is offline Advanced Beginner
    Windows 7 64bit Office 365
    Join Date
    May 2022
    Posts
    37

    How to remove the timestamp from date field

    Hi. I am trying to update data in power bi using a csv file in access, everything pulls in except the date field due to the timestamp

  2. #2
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,430
    a timestamp is the whole field - date and time. If you only want the date part then use the datevalue function to extract the date e.g.

    ?datevalue(now())
    02/08/2022

  3. #3
    Sonyat810 is offline Advanced Beginner
    Windows 7 64bit Office 365
    Join Date
    May 2022
    Posts
    37
    Its not showing the date at all in my csv file now

  4. #4
    Sonyat810 is offline Advanced Beginner
    Windows 7 64bit Office 365
    Join Date
    May 2022
    Posts
    37
    And all of the records show today date

  5. #5
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,938
    Quote Originally Posted by Sonyat810 View Post
    And all of the records show today date

    Code in post #2 was an example, you are meant to put your own datefield in the place of Now()
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  6. #6
    Sonyat810 is offline Advanced Beginner
    Windows 7 64bit Office 365
    Join Date
    May 2022
    Posts
    37
    I'm not good at this yet. Can you tell me what to put there

  7. #7
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,430
    the name of your timestamp field

    I am assuming you are exporting a query and not a table

  8. #8
    Sonyat810 is offline Advanced Beginner
    Windows 7 64bit Office 365
    Join Date
    May 2022
    Posts
    37
    My field is called Date field. I am trying to update a linked csv file. There are various dates in there already

  9. #9
    Sonyat810 is offline Advanced Beginner
    Windows 7 64bit Office 365
    Join Date
    May 2022
    Posts
    37
    Here is what I have and all of the dates are today dates
    ?Datevalue(Date())

  10. #10
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,938
    First of all Date is a reserved word.
    That and Date() is today.
    So rename your field something meaningful and use that.

    Access is only doing what you are telling it to do.
    You do not use the ? either, again that was just to confirm the function result.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  11. #11
    Sonyat810 is offline Advanced Beginner
    Windows 7 64bit Office 365
    Join Date
    May 2022
    Posts
    37
    My file is too large to upload. Let me make a test database and send it to you so you can see what I'm saying

  12. #12
    Sonyat810 is offline Advanced Beginner
    Windows 7 64bit Office 365
    Join Date
    May 2022
    Posts
    37
    when I enter =DateValue(myDate()) the name has an error of #Name? in the field

  13. #13
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,430
    Remove the ()

  14. #14
    Sonyat810 is offline Advanced Beginner
    Windows 7 64bit Office 365
    Join Date
    May 2022
    Posts
    37
    I removed it and it still didn't work. It put parenthesis around "myDate"

  15. #15
    Sonyat810 is offline Advanced Beginner
    Windows 7 64bit Office 365
    Join Date
    May 2022
    Posts
    37

    DateValue not working

    I removed the () and I am still getting the timestamp
    Attached Thumbnails Attached Thumbnails Capture.PNG  

Page 1 of 4 1234 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Timestamp converted to just date
    By Lisa Roby in forum Queries
    Replies: 12
    Last Post: 03-24-2020, 07:41 PM
  2. Replies: 8
    Last Post: 11-16-2017, 03:07 PM
  3. Replies: 6
    Last Post: 06-30-2017, 02:15 PM
  4. Replies: 6
    Last Post: 04-19-2016, 03:58 PM
  5. Replies: 3
    Last Post: 11-12-2014, 05:31 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums